Updating Ghoul repository

Updating SGCT repository
Removing compiler warnings
This commit is contained in:
Alexander Bock
2017-03-10 09:32:16 -05:00
parent dbceb169f7
commit bcf92804b6
39 changed files with 201 additions and 164 deletions

View File

@@ -78,6 +78,8 @@ std::string to_string(openspace::documentation::TestResult::Offense::Reason reas
return "Verification failed";
case openspace::documentation::TestResult::Offense::Reason::WrongType:
return "Wrong type";
default:
ghoul_assert(false, "Missing case label");
}
}
@@ -85,6 +87,8 @@ std::string to_string(openspace::documentation::TestResult::Warning::Reason reas
switch (reason) {
case openspace::documentation::TestResult::Warning::Reason::Deprecated:
return "Deprecated";
default:
ghoul_assert(false, "Missing case label");
}
}

View File

@@ -217,33 +217,33 @@ TestResult ReferencingVerifier::operator()(const ghoul::Dictionary& dictionary,
{
TestResult res = TableVerifier::operator()(dictionary, key);
if (res.success) {
std::vector<Documentation> documentations = DocEng.documentations();
std::vector<Documentation> docs = DocEng.documentations();
auto it = std::find_if(
documentations.begin(),
documentations.end(),
docs.begin(),
docs.end(),
[this](const Documentation& doc) { return doc.id == identifier; }
);
ghoul_assert(
it != documentations.end(),
it != docs.end(),
"Did not find referencing identifier '" + identifier + "'"
);
ghoul::Dictionary d = dictionary.value<ghoul::Dictionary>(key);
TestResult res = testSpecification(*it, d);
TestResult r = testSpecification(*it, d);
// Add the 'key' as a prefix to make the offender a fully qualified identifer
for (TestResult::Offense& s : res.offenses) {
for (TestResult::Offense& s : r.offenses) {
s.offender = key + "." + s.offender;
}
// Add the 'key' as a prefix to make the warning a fully qualified identifer
for (TestResult::Warning& w : res.warnings) {
for (TestResult::Warning& w : r.warnings) {
w.offender = key + "." + w.offender;
}
return res;
return r;
}
else {
return res;