mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-14 23:41:50 +00:00
update files::write_string signature
This commit is contained in:
parent
a6dea71bf5
commit
0c9fb987a1
2 changed files with 2 additions and 2 deletions
|
|
@ -110,7 +110,7 @@ std::string files::read_string(const fs::path& filename) {
|
||||||
return std::string((const char*)bytes.get(), size);
|
return std::string((const char*)bytes.get(), size);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool files::write_string(const fs::path& filename, const std::string content) {
|
bool files::write_string(const fs::path& filename, std::string_view content) {
|
||||||
std::ofstream file(filename);
|
std::ofstream file(filename);
|
||||||
if (!file) {
|
if (!file) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ namespace files {
|
||||||
uint append_bytes(const fs::path& file, const ubyte* data, size_t size);
|
uint append_bytes(const fs::path& file, const ubyte* data, size_t size);
|
||||||
|
|
||||||
/// @brief Write string to the file
|
/// @brief Write string to the file
|
||||||
bool write_string(const fs::path& filename, const std::string content);
|
bool write_string(const fs::path& filename, std::string_view content);
|
||||||
|
|
||||||
/// @brief Write dynamic data to the JSON file
|
/// @brief Write dynamic data to the JSON file
|
||||||
/// @param nice if true, human readable format will be used, otherwise
|
/// @param nice if true, human readable format will be used, otherwise
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue