diff options
author | Adrián Medraño Calvo <adrian@medranocalvo.com> | 2017-07-21 09:20:28 (GMT) |
---|---|---|
committer | Adrián Medraño Calvo <adrian@medranocalvo.com> | 2017-07-21 11:40:48 (GMT) |
commit | f14d9dc7c790f40e897bf4f3afaacdde6509adac (patch) | |
tree | 9decc8ccfb18a38a94568feea8c9dc66e4ff6fd2 /generic/tkbltGrLegd.C | |
parent | 095e27e5a9b983b7a20ea6bc4b9f4989ddb9a160 (diff) | |
download | blt-f14d9dc7c790f40e897bf4f3afaacdde6509adac.zip blt-f14d9dc7c790f40e897bf4f3afaacdde6509adac.tar.gz blt-f14d9dc7c790f40e897bf4f3afaacdde6509adac.tar.bz2 |
Enforce explicit downcasting of numeric values
As part of the change, upgrade tkblt internal structures from
short/float to int/double, as those are artifacts of the legacy code
relying on X. Downcast to short at the latest stage: when interfacing
with X.
Diffstat (limited to 'generic/tkbltGrLegd.C')
-rw-r--r-- | generic/tkbltGrLegd.C | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/generic/tkbltGrLegd.C b/generic/tkbltGrLegd.C index 5242215..3b08f23 100644 --- a/generic/tkbltGrLegd.C +++ b/generic/tkbltGrLegd.C @@ -878,8 +878,8 @@ int Legend::getElementFromObj(Tcl_Obj* objPtr, Element** elemPtrPtr) Element* Legend::getNextRow(Element* focusPtr) { - int col = focusPtr->col_; - int row = focusPtr->row_ + 1; + unsigned col = focusPtr->col_; + unsigned row = focusPtr->row_ + 1; for (ChainLink* link = focusPtr->link; link; link = Chain_NextLink(link)) { Element* elemPtr = (Element*)Chain_GetValue(link); ElementOptions* elemOps = (ElementOptions*)elemPtr->ops(); @@ -895,8 +895,8 @@ Element* Legend::getNextRow(Element* focusPtr) Element* Legend::getNextColumn(Element* focusPtr) { - int col = focusPtr->col_ + 1; - int row = focusPtr->row_; + unsigned col = focusPtr->col_ + 1; + unsigned row = focusPtr->row_; for (ChainLink* link = focusPtr->link; link; link = Chain_NextLink(link)) { Element* elemPtr = (Element*)Chain_GetValue(link); ElementOptions* elemOps = (ElementOptions*)elemPtr->ops(); @@ -912,8 +912,8 @@ Element* Legend::getNextColumn(Element* focusPtr) Element* Legend::getPreviousRow(Element* focusPtr) { - int col = focusPtr->col_; - int row = focusPtr->row_ - 1; + unsigned col = focusPtr->col_; + unsigned row = focusPtr->row_ - 1; for (ChainLink* link = focusPtr->link; link; link = Chain_PrevLink(link)) { Element* elemPtr = (Element*)Chain_GetValue(link); ElementOptions* elemOps = (ElementOptions*)elemPtr->ops(); @@ -929,8 +929,8 @@ Element* Legend::getPreviousRow(Element* focusPtr) Element* Legend::getPreviousColumn(Element* focusPtr) { - int col = focusPtr->col_ - 1; - int row = focusPtr->row_; + unsigned col = focusPtr->col_ - 1; + unsigned row = focusPtr->row_; for (ChainLink* link = focusPtr->link; link; link = Chain_PrevLink(link)) { Element* elemPtr = (Element*)Chain_GetValue(link); ElementOptions* elemOps = (ElementOptions*)elemPtr->ops(); |