utils: Convert Windows args to utf-8 string

This commit is contained in:
Chun Kuan Lee
2018-08-05 16:38:25 +00:00
parent 9b8bb5f140
commit 380c843217
6 changed files with 62 additions and 1 deletions

View File

@@ -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