Code Cleanup
- The str_replace is no longer needed.
This commit is contained in:
16
src/Att.cpp
16
src/Att.cpp
@@ -92,22 +92,6 @@ static const char* modifierNames[] =
|
|||||||
#define NUM_MODIFIABLE_NAMES (sizeof (modifiableNames) / sizeof (modifiableNames[0]))
|
#define NUM_MODIFIABLE_NAMES (sizeof (modifiableNames) / sizeof (modifiableNames[0]))
|
||||||
#define NUM_MODIFIER_NAMES (sizeof (modifierNames) / sizeof (modifierNames[0]))
|
#define NUM_MODIFIER_NAMES (sizeof (modifierNames) / sizeof (modifierNames[0]))
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
static inline std::string& str_replace (
|
|
||||||
std::string &str,
|
|
||||||
const std::string& search,
|
|
||||||
const std::string& replacement)
|
|
||||||
{
|
|
||||||
std::string::size_type pos = 0;
|
|
||||||
while ((pos = str.find (search, pos)) != std::string::npos)
|
|
||||||
{
|
|
||||||
str.replace (pos, search.length (), replacement);
|
|
||||||
pos += replacement.length ();
|
|
||||||
}
|
|
||||||
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
Att::Att ()
|
Att::Att ()
|
||||||
: _name ("")
|
: _name ("")
|
||||||
|
|||||||
Reference in New Issue
Block a user