summaryrefslogtreecommitdiff
path: root/indra/newview/lllicenseinfo.cpp
diff options
context:
space:
mode:
authorHoward Stearns <howard.stearns@gmail.com>2021-12-30 09:45:47 -0800
committerHoward Stearns <howard.stearns@gmail.com>2022-01-06 15:43:55 -0800
commit0e94fe645bb7d62ecd2477a7287608a7e5159913 (patch)
tree319042f844da12028fc0514e185164fd57c23491 /indra/newview/lllicenseinfo.cpp
parentb829efe759c4669cfaad681f22bd7b4b19c02b37 (diff)
SL-13297 - Get rid of new lllicenseinfo. We do not need it.
Diffstat (limited to 'indra/newview/lllicenseinfo.cpp')
-rw-r--r--indra/newview/lllicenseinfo.cpp84
1 files changed, 0 insertions, 84 deletions
diff --git a/indra/newview/lllicenseinfo.cpp b/indra/newview/lllicenseinfo.cpp
deleted file mode 100644
index e68b661763..0000000000
--- a/indra/newview/lllicenseinfo.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * @file lllicenseinfo.cpp
- * @brief Routines to access library version and license information
- * @author Aech Linden
- *
- * $LicenseInfo:firstyear=2021&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2021, 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$
- */
-
-#include "llviewerprecompiledheaders.h"
-#include "lllicenseinfo.h"
-#include <boost/algorithm/string.hpp>
-#include "lldir.h"
-
-LLLicenseInfo::LLLicenseInfo()
-{
- LL_DEBUGS("LicenseInfo") << "instantiating license info" << LL_ENDL;
-}
-
-void LLLicenseInfo::initSingleton()
-{
- // Get the the map with name => {version, cpyrights}, from file created at build time
- std::string licenses_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "packages-info.txt");
- llifstream licenses_file;
- licenses_file.open(licenses_path.c_str()); /* Flawfinder: ignore */
- if (!licenses_file.is_open()) {
- LL_INFOS("LicenseInfo") << "Could not read licenses file at " << licenses_path << LL_ENDL;
- return;
- }
-
- LL_DEBUGS("LicenseInfo") << "Reading licenses file at " << licenses_path << LL_ENDL;
- std::string license_line;
- std::string name{}, version{}, copyright{};
- while ( std::getline(licenses_file, license_line) )
- {
- if (license_line.empty()) // blank line starts a new library/version/copyright
- {
- if (!name.empty()) { // Add what we have accumulated.
- mLibraries.insert({name, {version, copyright}});
- }
- else
- {
- LL_WARNS("LicenseInfo") << "new line with no current data" << LL_ENDL;
- }
- name.clear();
- version.clear();
- copyright.clear();
- }
- else
- {
- if (name.empty()) { // No name yet. Parse this line into name and version.
- auto name_termination_index = license_line.find(':');
- if (name_termination_index == std::string::npos) // First line has no colon.
- {
- name_termination_index = license_line.find_last_of(' ');
- }
- name = license_line.substr(0, name_termination_index);
- version = license_line.substr(name_termination_index + 1);
- boost::algorithm::trim(version);
- } else {
- copyright += license_line;
- }
- }
- }
- licenses_file.close();
-}