Skip to content

Commit

Permalink
Pass strings as const references.
Browse files Browse the repository at this point in the history
It has refcounting, copy-on-write and all, but this is still better.
  • Loading branch information
mosra committed Nov 19, 2017
1 parent d8001ef commit ebf75c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/util.cpp
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/util.h
Expand Up @@ -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();

Expand Down

0 comments on commit ebf75c1

Please sign in to comment.