Skip to content

Commit

Permalink
Merge pull request #275 from WhiredPlanck/filesystem
Browse files Browse the repository at this point in the history
Replace boost filesystem with std filesystem
  • Loading branch information
hchunhui committed Oct 6, 2023
2 parents be8ea3b + 94334ca commit a0e78c4
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/opencc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,17 @@
#include <opencc/Dict.hpp>
#include <opencc/DictEntry.hpp>
#include <opencc/Common.hpp>
#include <boost/filesystem.hpp>
#include <rime/common.h>
#include <rime_api.h>

#if __cplusplus >= 201703L || _MSVC_LANG >= 201703L
#include <filesystem>
namespace ns = std::filesystem;
#else
#include <boost/filesystem.hpp>
namespace ns = boost::filesystem;
#endif

#include "lib/lua_export_type.h"
#include "lib/luatype_boost_optional.h"

Expand Down Expand Up @@ -131,8 +138,7 @@ vector<string> Opencc::convert_word(const string& text){
};

namespace OpenccReg {
typedef Opencc T;
namespace ns = boost::filesystem;
using T = Opencc;

optional<T> make(const string &filename) {
string user_path( RimeGetUserDataDir());
Expand Down

0 comments on commit a0e78c4

Please sign in to comment.