Declare some const functions as const.

llvm-svn: 127450
This commit is contained in:
Jim Ingham 2011-03-11 01:48:52 +00:00
parent 17de754181
commit b2605bc96d
2 changed files with 4 additions and 4 deletions

View File

@ -45,10 +45,10 @@ public:
ReadFileLines (FileSpec &input_file); ReadFileLines (FileSpec &input_file);
uint32_t uint32_t
GetSize (); GetSize () const;
const char * const char *
GetStringAtIndex (size_t idx); GetStringAtIndex (size_t idx) const;
void void
Clear (); Clear ();

View File

@ -80,13 +80,13 @@ StringList::ReadFileLines (FileSpec &input_file)
} }
uint32_t uint32_t
StringList::GetSize () StringList::GetSize () const
{ {
return m_strings.size(); return m_strings.size();
} }
const char * const char *
StringList::GetStringAtIndex (size_t idx) StringList::GetStringAtIndex (size_t idx) const
{ {
if (idx < m_strings.size()) if (idx < m_strings.size())
return m_strings[idx].c_str(); return m_strings[idx].c_str();