summaryrefslogtreecommitdiff
path: root/indra/llcommon/llliveappconfig.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-04-29 07:43:28 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-04-29 07:56:09 +0300
commit1b68f71348ecf3983b76b40d7940da8377f049b7 (patch)
tree2974eddaef130a067c26033d60a59fc790365b3d /indra/llcommon/llliveappconfig.cpp
parentaf4ea94efc1999f3b19fd8d643d0331f0b77e265 (diff)
#824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed
Diffstat (limited to 'indra/llcommon/llliveappconfig.cpp')
-rw-r--r--indra/llcommon/llliveappconfig.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/indra/llcommon/llliveappconfig.cpp b/indra/llcommon/llliveappconfig.cpp
index a9b1cdf4f6..559bfc443c 100644
--- a/indra/llcommon/llliveappconfig.cpp
+++ b/indra/llcommon/llliveappconfig.cpp
@@ -1,25 +1,25 @@
-/**
+/**
* @file llliveappconfig.cpp
* @brief Configuration information for an LLApp that overrides indra.xml
*
* $LicenseInfo:firstyear=2003&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
- *
+ *
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ *
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -33,48 +33,48 @@
#include "llsdserialize.h"
LLLiveAppConfig::LLLiveAppConfig(
- const std::string& filename,
- F32 refresh_period,
- LLApp::OptionPriority priority) :
- LLLiveFile(filename, refresh_period),
- mPriority(priority)
+ const std::string& filename,
+ F32 refresh_period,
+ LLApp::OptionPriority priority) :
+ LLLiveFile(filename, refresh_period),
+ mPriority(priority)
{ }
LLLiveAppConfig::~LLLiveAppConfig()
{ }
-// virtual
+// virtual
bool LLLiveAppConfig::loadFile()
{
- LL_INFOS() << "LLLiveAppConfig::loadFile(): reading from "
- << filename() << LL_ENDL;
+ LL_INFOS() << "LLLiveAppConfig::loadFile(): reading from "
+ << filename() << LL_ENDL;
llifstream file(filename().c_str());
- LLSD config;
+ LLSD config;
if (file.is_open())
{
LLSDSerialize::fromXML(config, file);
- if(!config.isMap())
- {
- LL_WARNS() << "Live app config not an map in " << filename()
- << " Ignoring the data." << LL_ENDL;
- return false;
- }
- file.close();
+ if(!config.isMap())
+ {
+ LL_WARNS() << "Live app config not an map in " << filename()
+ << " Ignoring the data." << LL_ENDL;
+ return false;
+ }
+ file.close();
+ }
+ else
+ {
+ LL_INFOS() << "Live file " << filename() << " does not exit." << LL_ENDL;
}
- else
- {
- LL_INFOS() << "Live file " << filename() << " does not exit." << LL_ENDL;
- }
- // *NOTE: we do not handle the else case here because we would not
- // have attempted to load the file unless LLLiveFile had
- // determined there was a reason to load it. This only happens
- // when either the file has been updated or it is either suddenly
- // in existence or has passed out of existence. Therefore, we want
- // to set the config to an empty config, and return that it
- // changed.
+ // *NOTE: we do not handle the else case here because we would not
+ // have attempted to load the file unless LLLiveFile had
+ // determined there was a reason to load it. This only happens
+ // when either the file has been updated or it is either suddenly
+ // in existence or has passed out of existence. Therefore, we want
+ // to set the config to an empty config, and return that it
+ // changed.
- LLApp* app = LLApp::instance();
- if(app) app->setOptionData(mPriority, config);
- return true;
+ LLApp* app = LLApp::instance();
+ if(app) app->setOptionData(mPriority, config);
+ return true;
}