From b23d8e7e174c2e68cdd3435cc42907796181d159 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Sat, 23 Oct 2010 23:58:07 +0200 Subject: IMP-664: WARNING: addFeature: LLFeatureList::Attempting to add preexisting feature Disregard128DefaultDrawDistance Fix a bug that causes the last line of the feature table file to be read twice. This patch also removes the check for name.empty() because that will never be true, so might as well remove it. --- linden/doc/contributions.txt | 1 + linden/indra/newview/llfeaturemanager.cpp | 11 +---------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/linden/doc/contributions.txt b/linden/doc/contributions.txt index 3158f2c..cd708fd 100644 --- a/linden/doc/contributions.txt +++ b/linden/doc/contributions.txt @@ -84,6 +84,7 @@ Aleric Inglewood IMP-661 IMP-662 IMP-663 + IMP-664 Alissa Sabre VWR-81 VWR-83 diff --git a/linden/indra/newview/llfeaturemanager.cpp b/linden/indra/newview/llfeaturemanager.cpp index 35613b7..54da31b 100644 --- a/linden/indra/newview/llfeaturemanager.cpp +++ b/linden/indra/newview/llfeaturemanager.cpp @@ -250,11 +250,9 @@ BOOL LLFeatureManager::loadFeatureTables() mTableVersion = version; LLFeatureList *flp = NULL; - while (!file.eof() && file.good()) + while (file >> name) { char buffer[MAX_STRING]; /*Flawfinder: ignore*/ - - file >> name; if (name.substr(0,2) == "//") { @@ -263,13 +261,6 @@ BOOL LLFeatureManager::loadFeatureTables() continue; } - if (name.empty()) - { - // This is a blank line - file.getline(buffer, MAX_STRING); - continue; - } - if (name == "list") { if (flp) -- cgit v1.1