mirror of https://github.com/axmolengine/axmol.git
add std::nothrow
This commit is contained in:
parent
7e26c381c6
commit
d55c0c64c5
|
@ -375,7 +375,7 @@ bool FileUtils::writeToFile(ValueMap& dict, const std::string &fullPath)
|
|||
|
||||
bool FileUtils::writeValueMapToFile(ValueMap& dict, const std::string& fullPath)
|
||||
{
|
||||
tinyxml2::XMLDocument *doc = new tinyxml2::XMLDocument();
|
||||
tinyxml2::XMLDocument *doc = new (std::nothrow)tinyxml2::XMLDocument();
|
||||
if (nullptr == doc)
|
||||
return false;
|
||||
|
||||
|
@ -415,7 +415,7 @@ bool FileUtils::writeValueMapToFile(ValueMap& dict, const std::string& fullPath)
|
|||
|
||||
bool FileUtils::writeValueVectorToFile(ValueVector vecData, const std::string& fullPath)
|
||||
{
|
||||
tinyxml2::XMLDocument *doc = new tinyxml2::XMLDocument();
|
||||
tinyxml2::XMLDocument *doc = new (std::nothrow)tinyxml2::XMLDocument();
|
||||
if (nullptr == doc)
|
||||
return false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue