summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVladimír Vondruš <mosra@centrum.cz>2017-11-19 12:24:41 (GMT)
committerVladimír Vondruš <mosra@centrum.cz>2017-11-19 12:24:41 (GMT)
commitebf75c1fe8a0ff2cc9235155b6d63367944d6342 (patch)
tree82bdb1c1c02d1241022b6756944ccf5c1a60cc91 /src
parentd8001efd89146e04d92f5ea41ab27a7de09b6c53 (diff)
downloadDoxygen-ebf75c1fe8a0ff2cc9235155b6d63367944d6342.zip
Doxygen-ebf75c1fe8a0ff2cc9235155b6d63367944d6342.tar.gz
Doxygen-ebf75c1fe8a0ff2cc9235155b6d63367944d6342.tar.bz2
Pass strings as const references.
It has refcounting, copy-on-write and all, but this is still better.
Diffstat (limited to 'src')
-rw-r--r--src/util.cpp2
-rw-r--r--src/util.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/util.cpp b/src/util.cpp
index d3d7dfe..8e4c5a7 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -7177,7 +7177,7 @@ void addCodeOnlyMappings()
updateLanguageMapping(".sql", "sql");
}
-SrcLangExt getLanguageFromFileName(const QCString fileName)
+SrcLangExt getLanguageFromFileName(const QCString& fileName)
{
int i = fileName.findRev('.');
if (i!=-1) // name has an extension
diff --git a/src/util.h b/src/util.h
index dd2f3aa..2f362fd 100644
--- a/src/util.h
+++ b/src/util.h
@@ -384,7 +384,7 @@ QCString stripLeadingAndTrailingEmptyLines(const QCString &s,int &docLine);
// const QCString &anchor="");
bool updateLanguageMapping(const QCString &extension,const QCString &parser);
-SrcLangExt getLanguageFromFileName(const QCString fileName);
+SrcLangExt getLanguageFromFileName(const QCString& fileName);
void initDefaultExtensionMapping();
void addCodeOnlyMappings();