Base/App: fix warnings from code analysers:
* convert old-style-casts to explicit C++ casts where possible * make some implicit conversions explicit
This commit is contained in:
@@ -42,9 +42,9 @@ Range::Range(const char * range)
|
||||
std::string from;
|
||||
std::string to;
|
||||
|
||||
assert(range != NULL);
|
||||
assert(range != nullptr);
|
||||
|
||||
if (strchr(range, ':') == NULL) {
|
||||
if (strchr(range, ':') == nullptr) {
|
||||
from = range;
|
||||
to = range;
|
||||
}
|
||||
@@ -247,13 +247,13 @@ std::string App::CellAddress::toString(Cell cell) const
|
||||
if (_absCol && flags.testFlag(Cell::Absolute))
|
||||
s << '$';
|
||||
if (col() < 26) {
|
||||
s << (char)('A' + col());
|
||||
s << static_cast<char>('A' + col());
|
||||
}
|
||||
else {
|
||||
int colnum = col() - 26;
|
||||
|
||||
s << (char)('A' + (colnum / 26));
|
||||
s << (char)('A' + (colnum % 26));
|
||||
s << static_cast<char>('A' + (colnum / 26));
|
||||
s << static_cast<char>('A' + (colnum % 26));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user