Permalink
Browse files

DSPTool: Remove unnecessary c_str() calls

These functions already accept std::string instances, so c_str here just
causes an unnecessary copy of the string to be made.
  • Loading branch information...
lioncash committed Jun 22, 2018
1 parent f62dffa commit 537d09e1d4e01a2a3d36221c1df152b3cefd3953
Showing with 2 additions and 2 deletions.
  1. +2 −2 Source/DSPTool/DSPTool.cpp
@@ -267,7 +267,7 @@ static bool PerformAssembly(const std::string& input_name, const std::string& ou
}
std::string source;
if (File::ReadFileToString(input_name.c_str(), source))
if (File::ReadFileToString(input_name, source))
{
if (multiple)
{
@@ -291,7 +291,7 @@ static bool PerformAssembly(const std::string& input_name, const std::string& ou
for (int i = 0; i < lines; i++)
{
if (!File::ReadFileToString(files[i].c_str(), currentSource))
if (!File::ReadFileToString(files[i], currentSource))
{
printf("ERROR reading %s, skipping...\n", files[i].c_str());
lines--;

0 comments on commit 537d09e

Please sign in to comment.