mirror of
https://gitee.com/fasiondog/hikyuu.git
synced 2024-11-30 02:48:57 +08:00
use nowide::ofstream on linux
This commit is contained in:
parent
09fedc15ec
commit
e9e25ecc53
@ -8,16 +8,12 @@
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
#ifdef _MSC_VER
|
||||
#include <boost/nowide/fstream.hpp>
|
||||
#endif
|
||||
|
||||
#include "arithmetic.h"
|
||||
#include "IniParser.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
namespace nw = boost::nowide;
|
||||
#endif
|
||||
|
||||
namespace hku {
|
||||
|
||||
@ -63,11 +59,7 @@ IniParser::~IniParser() {}
|
||||
* @param filename 指定文件名
|
||||
*/
|
||||
void IniParser::read(const std::string& filename) {
|
||||
#ifdef _MSC_VER
|
||||
nw::ifstream inifile(filename.c_str(), nw::ifstream::in);
|
||||
#else
|
||||
std::ifstream inifile(filename.c_str(), std::ifstream::in);
|
||||
#endif
|
||||
if (!inifile) {
|
||||
throw(std::invalid_argument("Can't read file(" + filename + ")!"));
|
||||
}
|
||||
|
@ -155,12 +155,12 @@ add_requires("myboost " .. boost_version, {
|
||||
debug = is_mode("debug"),
|
||||
configs = {
|
||||
shared = is_plat("windows") and true or false,
|
||||
data_time = true,
|
||||
date_time = true,
|
||||
filesystem = true,
|
||||
serialization = true,
|
||||
system = false,
|
||||
python = true,
|
||||
nowide = is_plat("windows") and true or false,
|
||||
nowide = true,
|
||||
pyver = get_config("pyver"),
|
||||
},
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user