chore: remove unused removeAlias methods
This commit is contained in:
parent
f3fb31914d
commit
2d5cf33f16
2 changed files with 0 additions and 69 deletions
|
|
@ -143,55 +143,6 @@ bool Config::addAlias(const std::string &canonical, const std::string &alias)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Config::removeAlias(const std::string &alias)
|
||||
{
|
||||
// must not be a canonical name
|
||||
if (m_map.contains(alias)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// find alias
|
||||
NameMap::iterator index = m_nameToCanonicalName.find(alias);
|
||||
if (index == m_nameToCanonicalName.end()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// remove alias
|
||||
m_nameToCanonicalName.erase(index);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Config::removeAliases(const std::string &canonical)
|
||||
{
|
||||
// must be a canonical name
|
||||
if (!m_map.contains(canonical)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// find and removing matching aliases
|
||||
for (auto index = m_nameToCanonicalName.begin(); index != m_nameToCanonicalName.end();) {
|
||||
if (index->second == canonical && index->first != canonical) {
|
||||
m_nameToCanonicalName.erase(index++);
|
||||
} else {
|
||||
++index;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Config::removeAllAliases()
|
||||
{
|
||||
// remove all names
|
||||
m_nameToCanonicalName.clear();
|
||||
|
||||
// put the canonical names back in
|
||||
for (auto index = m_map.begin(); index != m_map.end(); ++index) {
|
||||
m_nameToCanonicalName.insert(std::make_pair(index->first, index->first));
|
||||
}
|
||||
}
|
||||
|
||||
bool Config::connect(
|
||||
const std::string &srcName, Direction srcSide, float srcStart, float srcEnd, const std::string &dstName,
|
||||
float dstStart, float dstEnd
|
||||
|
|
|
|||
|
|
@ -235,26 +235,6 @@ public:
|
|||
*/
|
||||
bool addAlias(const std::string &canonical, const std::string &alias);
|
||||
|
||||
//! Remove alias
|
||||
/*!
|
||||
Removes an alias for a screen name. It returns false if the
|
||||
alias is unknown or a canonical name, otherwise returns true.
|
||||
*/
|
||||
bool removeAlias(const std::string &alias);
|
||||
|
||||
//! Remove aliases
|
||||
/*!
|
||||
Removes all aliases for a canonical screen name. It returns false
|
||||
if the canonical name is unknown, otherwise returns true.
|
||||
*/
|
||||
bool removeAliases(const std::string &canonical);
|
||||
|
||||
//! Remove all aliases
|
||||
/*!
|
||||
This removes all aliases but not the screens.
|
||||
*/
|
||||
void removeAllAliases();
|
||||
|
||||
//! Connect screens
|
||||
/*!
|
||||
Establishes a one-way connection between portions of opposite edges
|
||||
|
|
|
|||
Loading…
Reference in a new issue