fix reserve call that should have been resize - add extra handling to output error

This commit is contained in:
hultonha
2021-04-15 18:17:02 +01:00
parent 7c5f7181eb
commit 7ff0c5c33a
4 changed files with 17 additions and 3 deletions
@@ -3407,6 +3407,11 @@ namespace WhiteBox
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
if (input.empty())
{
return false;
}
std::string inputStr;
inputStr.reserve(input.size());
AZStd::copy(input.cbegin(), input.cend(), AZStd::back_inserter(inputStr));