Commit 6c8a36ab authored by Jasem Mutlaq's avatar Jasem Mutlaq

Remove checking for duplicate strings since it is extremely inefficient

parent a0ed7a02
......@@ -60,7 +60,9 @@ void CatalogComponent::loadData() {
this);
for (int iter = 0; iter < names.size(); iter++) {
if (names.at(iter).first <= SkyObject::TYPE_UNKNOWN) {
if (!objectNames(names.at(iter).first).contains(names.at(iter).second))
//FIXME JM 2016-06-02: inefficient and costly check
// Need better way around this
//if (!objectNames(names.at(iter).first).contains(names.at(iter).second))
objectNames(names.at(iter).first).append(names.at(iter).second);
}
}
......
......@@ -303,12 +303,14 @@ void DeepSkyComponent::loadData()
appendIndex( o, &m_OtherIndex, trixel );
}
//Add name to the list of object names if it does not exist already
if ( ! name.isEmpty() && !objectNames(type).contains(name))
// JM: VERY INEFFICIENT. Disabling for now until we figure out how to deal with dups. QSet?
//if ( ! name.isEmpty() && !objectNames(type).contains(name))
if ( ! name.isEmpty() )
objectNames(type).append( name );
//Add long name to the list of object names
if ( ! longname.isEmpty() && longname != name && !objectNames(type).contains(longname))
//if ( ! longname.isEmpty() && longname != name && !objectNames(type).contains(longname))
if ( ! longname.isEmpty() && longname != name)
objectNames(type).append( longname );
deep_sky_parser.ShowProgress();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment