diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-10-07 22:47:03 -0300 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-10-07 22:47:17 -0300 |
commit | 60a61611f6b6c54c05326e13ea8992451b8415ca (patch) | |
tree | f6d057ba03f21cdea69f9579c9868f8b4a853ad5 /src/util.h | |
parent | f504a1402afd0760e9d348ecc8bad0094aa7d705 (diff) | |
parent | 380c843217139b180457889699c65b37ae3b4a87 (diff) |
Merge #13883: utils: Convert Windows args to utf-8 string
380c843217 utils: Convert Windows args to utf-8 string (Chun Kuan Lee)
Pull request description:
Create a new class `WinCmdLineArgs` when building for Windows. It converts all command line arguments to utf8 string.
Tree-SHA512: f098520fd123a8a452bc84a55dc8c0b88f0c475410efe57f2ccc393f86c396eed59ea1575ddc1b920323792e390fdb092061d80cdcd9b682f0ac79a22a22ff82
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h index f119385e48..fa6d2cd489 100644 --- a/src/util.h +++ b/src/util.h @@ -29,6 +29,7 @@ #include <stdint.h> #include <string> #include <unordered_set> +#include <utility> #include <vector> #include <boost/thread/condition_variable.hpp> // for boost::thread_interrupted @@ -361,6 +362,21 @@ inline void insert(std::set<TsetT>& dst, const Tsrc& src) { dst.insert(src.begin(), src.end()); } +#ifdef WIN32 +class WinCmdLineArgs +{ +public: + WinCmdLineArgs(); + ~WinCmdLineArgs(); + std::pair<int, char**> get(); + +private: + int argc; + char** argv; + std::vector<std::string> args; +}; +#endif + } // namespace util #endif // BITCOIN_UTIL_H |