code style

This commit is contained in:
john30
2017-01-14 17:34:02 +01:00
parent 774e01e937
commit 0217096b6b
22 changed files with 132 additions and 120 deletions
+2 -2
View File
@@ -615,14 +615,14 @@ string MainLoop::executeRead(vector<string> &args) {
" Dx data byte(s) to send";
}
string fieldName;
signed char fieldIndex = -2;
char fieldIndex = -2;
if (args.size() == argPos + 2) {
fieldName = args[argPos + 1];
fieldIndex = -1;
size_t pos = fieldName.find_last_of('.');
if (pos != string::npos) {
result_t result = RESULT_OK;
fieldIndex = (char)parseInt(fieldName.substr(pos+1).c_str(), 10, 0, MAX_POS, result);
fieldIndex = static_cast<char>(parseInt(fieldName.substr(pos+1).c_str(), 10, 0, MAX_POS, result));
if (result == RESULT_OK) {
fieldName = fieldName.substr(0, pos);
}