Skip to content

Commit 6412cba

Browse files
committed
Remove nowide usages.
1 parent bf65d7a commit 6412cba

6 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/client/fix_imports.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void fix_imports(const String &target, const path &aliases_file, const path &old
5959

6060
if (!new_file.parent_path().empty())
6161
fs::create_directories(new_file.parent_path());
62-
boost::nowide::ofstream ofile(new_file.string());
62+
std::ofstream ofile(new_file);
6363
if (!ofile)
6464
throw std::runtime_error("Cannot open the output file for writing");
6565

src/common/database.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ void PackagesDatabase::load(bool drop)
10241024
throw std::runtime_error(sqlite3_errmsg(mdb));
10251025

10261026
auto fn = db_repo_dir / (td.name + ".csv");
1027-
boost::nowide::ifstream ifile(fn.string());
1027+
std::ifstream ifile(fn);
10281028
if (!ifile)
10291029
throw std::runtime_error("Cannot open file " + fn.string() + " for reading");
10301030

src/common/package.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ path Package::getStampFilename() const
5858
String Package::getStampHash() const
5959
{
6060
String hash;
61-
boost::nowide::ifstream ifile(getStampFilename().string());
61+
std::ifstream ifile(getStampFilename());
6262
if (ifile)
6363
ifile >> hash;
6464
return hash;

src/common/project.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ void check_file_types(const Files &files)
197197
throw std::runtime_error("Project sources did not pass file checks:\n" + errors);
198198

199199
auto fn = get_temp_filename();
200-
boost::nowide::ofstream o(fn.string(), std::ios::binary | std::ios::out);
200+
std::ofstream o(fn, std::ios::binary | std::ios::out);
201201
if (!o)
202-
throw std::runtime_error("Cannot open file for writing: " + fn.string());
202+
throw std::runtime_error("Cannot open file for writing: " + fn.u8string());
203203
for (auto &file : files)
204204
o << "file -ib " << normalize_path(file) << "\n";
205205
o.close();

src/common/settings.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,9 +547,9 @@ void Settings::clear_local_settings()
547547

548548
void Settings::save(const path &p) const
549549
{
550-
boost::nowide::ofstream o(p.string());
550+
std::ofstream o(p);
551551
if (!o)
552-
throw std::runtime_error("Cannot open file: " + p.string());
552+
throw std::runtime_error("Cannot open file: " + p.u8string());
553553
yaml root;
554554
root["remotes"][DEFAULT_REMOTE_NAME]["url"] = remotes[0].url;
555555
root["storage_dir"] = storage_dir.string();

src/common/sqlite_database.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ sqlite3 *load_from_file(const path &fn, bool read_only)
109109
else
110110
flags |= SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE;
111111
sqlite3_enable_shared_cache(1);
112-
ok = sqlite3_open_v2(fn.string().c_str(), &db, flags, nullptr) == SQLITE_OK;
112+
ok = sqlite3_open_v2(fn.u8string().c_str(), &db, flags, nullptr) == SQLITE_OK;
113113
if (!ok)
114114
{
115115
String error = "Can't open database file: " + fn.string() + " error: " + sqlite3_errmsg(db);

0 commit comments

Comments
 (0)