fix argument order, corrected find
This commit is contained in:
@@ -1975,7 +1975,7 @@ vector<Message*>* MessageMap::getByKey(const uint64_t key) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Message* MessageMap::find(const string& circuit, const string& levels, const string& name, const bool isWrite,
|
||||
Message* MessageMap::find(const string& circuit, const string& name, const string& levels, const bool isWrite,
|
||||
const bool isPassive) {
|
||||
string lcircuit = circuit;
|
||||
FileReader::tolower(lcircuit);
|
||||
@@ -2012,7 +2012,6 @@ deque<Message*> MessageMap::findAll(const string& circuit, const string& name, c
|
||||
FileReader::tolower(lname);
|
||||
bool checkCircuit = lcircuit.length() > 0;
|
||||
bool checkLevel = levels != "*";
|
||||
bool includeEmptyLevel = levels.empty();
|
||||
bool checkName = lname.length() > 0;
|
||||
for (map<string, vector<Message*> >::iterator it = m_messagesByName.begin(); it != m_messagesByName.end(); it++) {
|
||||
if (it->first[0] == '-') { // avoid duplicates: instances stored multiple times have a key starting with "-"
|
||||
@@ -2020,7 +2019,7 @@ deque<Message*> MessageMap::findAll(const string& circuit, const string& name, c
|
||||
}
|
||||
for (vector<Message*>::iterator msgIt = it->second.begin(); msgIt != it->second.end(); msgIt++) {
|
||||
Message* message = *msgIt;
|
||||
if (checkLevel && !message->hasLevel(levels, includeEmptyLevel)) {
|
||||
if (checkLevel && !message->hasLevel(levels, !completeMatch)) {
|
||||
continue;
|
||||
}
|
||||
if (checkCircuit) {
|
||||
|
||||
@@ -1320,7 +1320,6 @@ class MessageMap : public FileReader {
|
||||
* @param withWrite true to include write messages (default false).
|
||||
* @param withPassive true to include passive messages (default false).
|
||||
* @return the found @a Message instances.
|
||||
* @param completeMatchIgnoreCircuitSuffix ignore different circuit suffixes (after "#") for completeMatch.
|
||||
* @param onlyAvailable true to include only available messages (default true), false to also include messages that
|
||||
* are currently not available (e.g. due to unresolved or false conditions).
|
||||
* @param since the start time from which to add updates (inclusive, also removes messages with unset destination
|
||||
|
||||
Reference in New Issue
Block a user