Pass a const reference, if someone wants to modify it they should use the global directly.

Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D738
This was SVN commit r20027.
This commit is contained in:
leper
2017-08-23 23:52:32 +00:00
parent 683e19a7ed
commit 7970c3dc54
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -408,7 +408,7 @@ ErrorReactionInternal psDisplayError(const wchar_t* UNUSED(text), size_t UNUSED(
return ERI_NOT_IMPLEMENTED;
}
std::vector<CStr>& GetMods(const CmdLineArgs& args, int flags)
const std::vector<CStr>& GetMods(const CmdLineArgs& args, int flags)
{
const bool init_mods = (flags & INIT_MODS) == INIT_MODS;
const bool add_user = !InDevelopmentCopy() && !args.Has("noUserMod");
+1 -1
View File
@@ -78,7 +78,7 @@ extern void RenderCursor(bool RenderingState);
class CmdLineArgs;
class Paths;
extern std::vector<CStr>& GetMods(const CmdLineArgs& args, int flags);
extern const std::vector<CStr>& GetMods(const CmdLineArgs& args, int flags);
extern void MountMods(const Paths& paths, const std::vector<CStr>& mods);
/**
* Returns true if successful, false if mods changed and restart_engine was called.