diff options
author | corvid, Sebastian Geerken <devnull@localhost> | 2014-07-19 11:57:39 +0200 |
---|---|---|
committer | corvid, Sebastian Geerken <devnull@localhost> | 2014-07-19 11:57:39 +0200 |
commit | f2a6892bc240c3a177ea98de50467b74f3fb18b7 (patch) | |
tree | ec2d4f19116f2f47c67ca2fe4a080335e6e052b3 /dw/textblock.cc | |
parent | 627abe06cd649cbd42dca9883e2c0a1e2b3ee9b0 (diff) |
Fixed compiler warning.
Diffstat (limited to 'dw/textblock.cc')
-rw-r--r-- | dw/textblock.cc | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc index beb3f3f8..123b5b40 100644 --- a/dw/textblock.cc +++ b/dw/textblock.cc @@ -2655,19 +2655,9 @@ void Textblock::breakAdded () // actual width (Word::totalWidth) would include the space, so that // the width of the line is larger than the available width. - // Casting words->size() to long avoids the compiler warning - // - // "assuming signed overflow does not occur when assuming that - // (X - c) > X is always false [-Wstrict-overflow]" - // - // With long, the assumtion (X - c) > X (with X = words->size() and - // c = 2) is indeed always false. - // - // Let me know if you know a better solution. --SG - if (words->size () >= 2) - words->getRef((long)words->size () - 2)->origSpace = - words->getRef((long)words->size () - 2)->effSpace = 0; + words->getRef(words->size () - 2)->origSpace = + words->getRef(words->size () - 2)->effSpace = 0; } /** |