diff options
author | Adam Borowski <kilobyte@angband.pl> | 2011-09-01 13:13:29 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2011-09-01 15:23:25 +0200 |
commit | e128f59130d5a83b1149eb2aa13d877de0005e49 (patch) | |
tree | f4fb8bb759ea7b7ffacd7dbb8ddc05a608ed913a /crawl-ref/source/skills2.h | |
parent | dab06ca6e2eb914740ff00cb4963cfd24203b0ea (diff) | |
download | crawl-ref-e128f59130d5a83b1149eb2aa13d877de0005e49.tar.gz crawl-ref-e128f59130d5a83b1149eb2aa13d877de0005e49.zip |
Fix some abuses of "char" as an integer type.
It is meant to store an arbitrary unit of memory (byte since the Stone Age),
and details like signedness are undefined. For a "very short int", there are
int8_t and uint8_t, with defined semantics.
Here, we had chars of -1 used to mark disabled skills, which doesn't work on
ARM and PPC.
Diffstat (limited to 'crawl-ref/source/skills2.h')
-rw-r--r-- | crawl-ref/source/skills2.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/skills2.h b/crawl-ref/source/skills2.h index 2b8f9c4db0..5e896d43f8 100644 --- a/crawl-ref/source/skills2.h +++ b/crawl-ref/source/skills2.h @@ -16,7 +16,7 @@ struct skill_state { FixedVector<uint8_t, NUM_SKILLS> skills; FixedVector<uint8_t, NUM_SKILLS> changed_skills; - FixedVector<char, NUM_SKILLS> train; + FixedVector<int8_t, NUM_SKILLS> train; FixedVector<unsigned int, NUM_SKILLS> training; FixedVector<unsigned int, NUM_SKILLS> skill_points; FixedVector<unsigned int, NUM_SKILLS> ct_skill_points; |