From 35a7db9f540eea9abc45c592aa5ed02ffd920448 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sat, 13 Apr 2019 01:25:53 +1000 Subject: [PATCH] fix style --- src/tools/questbattle_bruteforce/main.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/tools/questbattle_bruteforce/main.cpp b/src/tools/questbattle_bruteforce/main.cpp index 50df0b6d..66b38d5e 100644 --- a/src/tools/questbattle_bruteforce/main.cpp +++ b/src/tools/questbattle_bruteforce/main.cpp @@ -52,11 +52,15 @@ void exportFile( const std::string& path ) } } -bool replace(std::string& str, const std::string& from, const std::string& to) { - size_t start_pos = str.find(from); - if(start_pos == std::string::npos) +bool replace( std::string& str, const std::string& from, const std::string& to ) +{ + size_t start_pos = str.find( from ); + + if( start_pos == std::string::npos ) return false; - str.replace(start_pos, from.length(), to); + + str.replace( start_pos, from.length(), to ); + return true; }