diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp index 8a5c3388b8..3089a20b02 100644 --- a/indra/newview/llviewernetwork.cpp +++ b/indra/newview/llviewernetwork.cpp @@ -434,7 +434,7 @@ void LLGridManager::setGridChoice(const std::string& grid) } } -std::string LLGridManager::getGrid( const std::string &grid ) +std::string LLGridManager::getGrid( const std::string &grid ) const // const correctness needed for Linux and MacOS { std::string grid_name; @@ -446,7 +446,7 @@ std::string LLGridManager::getGrid( const std::string &grid ) else { // search the grid list for a grid with a matching id - for(LLSD::map_iterator grid_iter = mGridList.beginMap(); + for(auto grid_iter = mGridList.beginMap(); // Let the compiler get the constness right grid_name.empty() && grid_iter != mGridList.endMap(); grid_iter++) { diff --git a/indra/newview/llviewernetwork.h b/indra/newview/llviewernetwork.h index 86a46e4849..eb3cf1a7a6 100644 --- a/indra/newview/llviewernetwork.h +++ b/indra/newview/llviewernetwork.h @@ -95,7 +95,7 @@ class LLGridManager : public LLSingleton * descriptive form (it is used in the login panel grid menu, for example). */ /// Return the name of a grid, given either its name or its id - std::string getGrid( const std::string &grid ); + std::string getGrid( const std::string &grid ) const; // const correctness needed for Linux and MacOS /// Get the id (short form selector) for a given grid std::string getGridId(const std::string& grid); @@ -201,7 +201,7 @@ class LLGridManager : public LLSingleton void setGridChoice(const std::string& grid); /// Returns the name of the currently selected grid - std::string getGrid() { return mGrid; } + std::string getGrid() const { return mGrid; }; // const correctness needed for Linux and MacOS //@}