fix argument order, corrected find
This commit is contained in:
@@ -1975,7 +1975,7 @@ vector<Message*>* MessageMap::getByKey(const uint64_t key) {
|
|||||||
return NULL;
|
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) {
|
const bool isPassive) {
|
||||||
string lcircuit = circuit;
|
string lcircuit = circuit;
|
||||||
FileReader::tolower(lcircuit);
|
FileReader::tolower(lcircuit);
|
||||||
@@ -2012,7 +2012,6 @@ deque<Message*> MessageMap::findAll(const string& circuit, const string& name, c
|
|||||||
FileReader::tolower(lname);
|
FileReader::tolower(lname);
|
||||||
bool checkCircuit = lcircuit.length() > 0;
|
bool checkCircuit = lcircuit.length() > 0;
|
||||||
bool checkLevel = levels != "*";
|
bool checkLevel = levels != "*";
|
||||||
bool includeEmptyLevel = levels.empty();
|
|
||||||
bool checkName = lname.length() > 0;
|
bool checkName = lname.length() > 0;
|
||||||
for (map<string, vector<Message*> >::iterator it = m_messagesByName.begin(); it != m_messagesByName.end(); it++) {
|
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 "-"
|
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++) {
|
for (vector<Message*>::iterator msgIt = it->second.begin(); msgIt != it->second.end(); msgIt++) {
|
||||||
Message* message = *msgIt;
|
Message* message = *msgIt;
|
||||||
if (checkLevel && !message->hasLevel(levels, includeEmptyLevel)) {
|
if (checkLevel && !message->hasLevel(levels, !completeMatch)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (checkCircuit) {
|
if (checkCircuit) {
|
||||||
|
|||||||
@@ -1320,7 +1320,6 @@ class MessageMap : public FileReader {
|
|||||||
* @param withWrite true to include write messages (default false).
|
* @param withWrite true to include write messages (default false).
|
||||||
* @param withPassive true to include passive messages (default false).
|
* @param withPassive true to include passive messages (default false).
|
||||||
* @return the found @a Message instances.
|
* @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
|
* @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).
|
* 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
|
* @param since the start time from which to add updates (inclusive, also removes messages with unset destination
|
||||||
|
|||||||
Reference in New Issue
Block a user