Optimzie writeStringToFile

This commit is contained in:
halx99 2020-06-14 15:54:55 +08:00
parent ef9b96de58
commit 7cd562750e
1 changed files with 1 additions and 1 deletions

View File

@ -479,7 +479,7 @@ FileUtils::~FileUtils()
bool FileUtils::writeStringToFile(const std::string& dataStr, const std::string& fullPath) const
{
return FileUtils::writeBinaryToFile(dataStr.c_str(), dataStr.length(), fullPath);
return FileUtils::writeBinaryToFile(dataStr.c_str(), dataStr.size(), fullPath);
}
void FileUtils::writeStringToFile(std::string dataStr, const std::string& fullPath, std::function<void(bool)> callback) const