all retval replacements
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
This commit is contained in:
@ -6,23 +6,23 @@ ReturnValue_t scratch::writeString(std::string name, std::string string) {
|
||||
int result = std::system(oss.str().c_str());
|
||||
if (result != 0) {
|
||||
utility::handleSystemError(result, "scratch::writeString");
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t scratch::readString(std::string key, std::string &string) {
|
||||
std::ifstream file;
|
||||
std::string filename;
|
||||
ReturnValue_t result = readToFile(key, file, filename);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string line;
|
||||
if (not std::getline(file, line)) {
|
||||
std::remove(filename.c_str());
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
|
||||
size_t pos = line.find("=");
|
||||
@ -35,7 +35,7 @@ ReturnValue_t scratch::readString(std::string key, std::string &string) {
|
||||
return KEY_NOT_FOUND;
|
||||
}
|
||||
string = line.substr(pos + 1);
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t scratch::clearValue(std::string key) {
|
||||
@ -44,7 +44,7 @@ ReturnValue_t scratch::clearValue(std::string key) {
|
||||
int result = std::system(oss.str().c_str());
|
||||
if (result != 0) {
|
||||
utility::handleSystemError(result, "scratch::clearValue");
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
Reference in New Issue
Block a user