forked from mia/Aegisub
1e0f08c0ed
Use boost::filesystem::path for all paths, and std::string for all other strings, converting to/from wxString as close to the actual uses of wx as possible. Where possible, replace the uses of non-UI wxWidgets functionality with the additions to the standard library in C++11, or the equivalents in boost. Move the path token management logic to libaegisub (and rewrite it in the process). Add a basic thread pool based on asio and std::thread to libaegisub. This touches nearly every file in the project and a nontrivial amount of code had to be rewritten entirely, so there's probably a lot of broken stuff.
21 lines
563 B
C++
21 lines
563 B
C++
#include "compat.h"
|
|
|
|
#include "options.h"
|
|
|
|
#include <algorithm>
|
|
|
|
wxArrayString lagi_MRU_wxAS(std::string const& list) {
|
|
auto const& vec = *config::mru->Get(list);
|
|
wxArrayString ret;
|
|
ret.reserve(vec.size());
|
|
transform(vec.begin(), vec.end(), std::back_inserter(ret),
|
|
[](agi::fs::path const& p) { return p.wstring(); });
|
|
return ret;
|
|
}
|
|
|
|
wxArrayString to_wx(std::vector<std::string> const& vec) {
|
|
wxArrayString ret;
|
|
ret.reserve(vec.size());
|
|
transform(vec.begin(), vec.end(), std::back_inserter(ret), (wxString (*)(std::string const&))to_wx);
|
|
return ret;
|
|
}
|