diff options
author | Haran Pilpel <haranp@users.sourceforge.net> | 2010-01-28 08:51:05 +0200 |
---|---|---|
committer | Haran Pilpel <haranp@users.sourceforge.net> | 2010-01-29 16:43:46 +0200 |
commit | 5f6162a4a0661e62e2426960d4cb5380a0b749d8 (patch) | |
tree | 7a662e7f90c4744bb6ba7bf0559bc934ff196fa4 /crawl-ref/source/format.cc | |
parent | 721a4e7bc5152fae1ce7c16ec7b6c25283defa18 (diff) | |
download | crawl-ref-5f6162a4a0661e62e2426960d4cb5380a0b749d8.tar.gz crawl-ref-5f6162a4a0661e62e2426960d4cb5380a0b749d8.zip |
Nuke a whole lot of old-style casts, and remove some casts completely
(you don't need to cast an X* to a void* and you don't need to cast
arguments to math.h functions such as sqrt.)
Diffstat (limited to 'crawl-ref/source/format.cc')
-rw-r--r-- | crawl-ref/source/format.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crawl-ref/source/format.cc b/crawl-ref/source/format.cc index 34b0f46439..9c1e02cf81 100644 --- a/crawl-ref/source/format.cc +++ b/crawl-ref/source/format.cc @@ -3,6 +3,8 @@ * Created by: haranp on Sat Feb 17 13:35:54 2007 UTC */ +#include <limits.h> + #include "AppHdr.h" #include "colour.h" @@ -436,7 +438,7 @@ int formatted_string::find_last_colour() const formatted_string formatted_string::substr(size_t start, size_t substr_length) const { - const unsigned int NONE = (unsigned int)-1; + const unsigned int NONE = UINT_MAX; // from limits.h unsigned int last_FSOP_COLOUR = NONE; unsigned int last_FSOP_CURSOR = NONE; |