mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 22:09:19 +02:00
changed NULL use to c++11 compliant
This commit is contained in:
@@ -118,9 +118,8 @@ std::string ExchangeCharInString( std::string const &Source, char const &From, c
|
||||
{
|
||||
std::string replacement; replacement.reserve( Source.size() );
|
||||
std::for_each(Source.cbegin(), Source.cend(), [&](char const idx) {
|
||||
if( idx != From ) { replacement += idx; }
|
||||
else {
|
||||
if( To != NULL ) { replacement += To; } }
|
||||
if( idx != From ) { replacement += idx; }
|
||||
else { replacement += To; }
|
||||
} );
|
||||
|
||||
return replacement;
|
||||
|
||||
Reference in New Issue
Block a user