Merge pull request #108 from halx99/master

Optimzie writeStringToFile
This commit is contained in:
halx99 2020-06-14 16:29:40 +08:00 committed by GitHub
parent 8f3c82a287
commit 44276b824a
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