modified signatures to allow it to pass compilation in XCode

This commit is contained in:
techdragon.nguyen@gmail.com
2011-10-15 19:32:00 +00:00
parent a1d278a140
commit 189351d82c
2 changed files with 12 additions and 10 deletions

View File

@@ -10,13 +10,14 @@ using std::vector;
vector<AutoLineMacro *> AutoLineMacro::gAutoLineMacros;
map<string, bool> AutoLineMacro::gAutoLineMacrosIndex;
AutoLineMacro::AutoLineMacro(string& s)
AutoLineMacro::AutoLineMacro(const string& s)
{
parse(s);
}
void AutoLineMacro::parse(string& s)
void AutoLineMacro::parse(const string& stringMacro)
{
string s = stringMacro;
//we convert to lower, because the counterpart (auto strings) is converted to lower at parse time
std::transform(s.begin(), s.end(), s.begin(), ::tolower);
@@ -48,7 +49,7 @@ void AutoLineMacro::parse(string& s)
boost::replace_all(mResult, "\\n", "\n");
}
string AutoLineMacro::process(string& s)
string AutoLineMacro::process(const string& s)
{
string temp = s;
if (!mParams.size())
@@ -92,7 +93,7 @@ string AutoLineMacro::process(string& s)
}
bool AutoLineMacro::AddMacro(string& s)
bool AutoLineMacro::AddMacro(const string& s)
{
AutoLineMacro * alm = NEW AutoLineMacro(s);
if (gAutoLineMacrosIndex[alm->mName])
@@ -115,7 +116,7 @@ void AutoLineMacro::Destroy()
}
}
string AutoLineMacro::Process(string& s)
string AutoLineMacro::Process(const string& s)
{
string result = s;
for (size_t i = 0; i < gAutoLineMacros.size(); ++i)