diff --git a/src/ParseSection.cpp b/src/ParseSection.cpp index 2258da1dbd..3fe6efbc3f 100644 --- a/src/ParseSection.cpp +++ b/src/ParseSection.cpp @@ -69,7 +69,7 @@ void PrintSection(section secInput) std::cerr << "PrintSection<" << std::endl; } -section::mapped_type* sectionEntries(section& secSource, std::string strSection) +section::mapped_type* sectionEntries(section& secSource, const std::string strSection) { section::iterator it; section::mapped_type* smtResult; @@ -96,7 +96,7 @@ int sectionCount(section& secSource, std::string strSection) return pmtEntries ? -1 : pmtEntries->size(); } -bool sectionSingleB(section& secSource, std::string strSection, std::string& strValue) +bool sectionSingleB(section& secSource, const std::string strSection, std::string& strValue) { section::mapped_type* pmtEntries = sectionEntries(secSource, strSection); bool bSingle = pmtEntries && 1 == pmtEntries->size(); diff --git a/src/ParseSection.h b/src/ParseSection.h index 1f7a4aa7c9..027f29f261 100644 --- a/src/ParseSection.h +++ b/src/ParseSection.h @@ -9,8 +9,8 @@ typedef std::map > section; section ParseSection(const std::string strInput, const bool bTrim); void PrintSection(section secInput); -bool sectionSingleB(section& secSource, std::string strSection, std::string& strValue); +bool sectionSingleB(section& secSource, const std::string strSection, std::string& strValue); int sectionCount(section& secSource, std::string strSection); -section::mapped_type* sectionEntries(section& secSource, std::string strSection); +section::mapped_type* sectionEntries(section& secSource, const std::string strSection); #endif