Skip to content

Commit 90e56ca

Browse files
committed
add a few more const
1 parent 795a7b0 commit 90e56ca

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

lib/importproject.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2260,7 +2260,7 @@ std::string ImportProject::toAbsolute(const std::string &filename, const std::st
22602260
return Path::simplifyPath(baseDir + resolved);
22612261
}
22622262

2263-
bool ImportProject::simplifyPathWithVariables(std::string &s, PropertiesMap &properties)
2263+
bool ImportProject::simplifyPathWithVariables(std::string &s, const PropertiesMap &properties)
22642264
{
22652265
// Normalize native separators before expansion so the expander sees clean
22662266
// paths and debug messages report '/' not '\\'.
@@ -2327,7 +2327,7 @@ void ImportProject::addProperty(const tinyxml2::XMLElement *node, PropertiesMap
23272327
checkUnexpandedExpressions(text, eName);
23282328
}
23292329

2330-
void ImportProject::addMetadata(const tinyxml2::XMLElement *node, PropertiesMap &properties, MetadataMap &metadata) {
2330+
void ImportProject::addMetadata(const tinyxml2::XMLElement *node, const PropertiesMap &properties, MetadataMap &metadata) {
23312331
const char *eName = node->Name();
23322332
if (!eName || !conditionIsTrue(node, properties))
23332333
return;
@@ -2352,7 +2352,7 @@ void ImportProject::addMetadata(const tinyxml2::XMLElement *node, PropertiesMap
23522352
checkUnexpandedExpressions(text, eName);
23532353
}
23542354

2355-
std::string ImportProject::getMetadata(const tinyxml2::XMLElement *node, PropertiesMap &properties, const MetadataMap &metadata, const std::string &original) {
2355+
std::string ImportProject::getMetadata(const tinyxml2::XMLElement *node, const PropertiesMap &properties, const MetadataMap &metadata, const std::string &original) {
23562356
const char *eName = node->Name();
23572357
const char *eText = node->GetText();
23582358
if (!eName || !eText || !conditionIsTrue(node, properties))

lib/importproject.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,10 @@ class CPPCHECKLIB WARN_UNUSED ImportProject {
205205
bool hasNameAndNotLabel(const tinyxml2::XMLElement * node, const char *nodeName, const char *nodeAttr, const PropertiesMap & properties);
206206

207207
void checkUnexpandedExpressions(const std::string &text, const char *context);
208-
bool simplifyPathWithVariables(std::string &s, PropertiesMap &properties);
208+
bool simplifyPathWithVariables(std::string &s, const PropertiesMap &properties);
209209
void addProperty(const tinyxml2::XMLElement *node, PropertiesMap &properties);
210-
void addMetadata(const tinyxml2::XMLElement *node, PropertiesMap &properties, MetadataMap &metadata);
211-
std::string getMetadata(const tinyxml2::XMLElement *node, PropertiesMap &properties, const MetadataMap &metadata, const std::string &original);
210+
void addMetadata(const tinyxml2::XMLElement *node, const PropertiesMap &properties, MetadataMap &metadata);
211+
std::string getMetadata(const tinyxml2::XMLElement *node, const PropertiesMap &properties, const MetadataMap &metadata, const std::string &original);
212212
std::string toAbsolute(const std::string &filename, const std::string &baseDir, PropertiesMap &properties);
213213
static std::string toAbsolute(const std::string &path);
214214
static void setSolution(const std::string &filename, PropertiesMap &properties);

0 commit comments

Comments
 (0)