mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Add const to some ParseSection functions.
This commit is contained in:
@@ -69,7 +69,7 @@ void PrintSection(section secInput)
|
|||||||
std::cerr << "PrintSection<" << std::endl;
|
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::iterator it;
|
||||||
section::mapped_type* smtResult;
|
section::mapped_type* smtResult;
|
||||||
@@ -96,7 +96,7 @@ int sectionCount(section& secSource, std::string strSection)
|
|||||||
return pmtEntries ? -1 : pmtEntries->size();
|
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);
|
section::mapped_type* pmtEntries = sectionEntries(secSource, strSection);
|
||||||
bool bSingle = pmtEntries && 1 == pmtEntries->size();
|
bool bSingle = pmtEntries && 1 == pmtEntries->size();
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ typedef std::map<const std::string, std::vector<std::string> > section;
|
|||||||
|
|
||||||
section ParseSection(const std::string strInput, const bool bTrim);
|
section ParseSection(const std::string strInput, const bool bTrim);
|
||||||
void PrintSection(section secInput);
|
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);
|
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
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user