diff options
author | John Wiegley <johnw@newartisans.com> | 2009-01-29 18:23:57 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-01-29 18:23:57 -0400 |
commit | 05c77351e458c08873c813264005f61f828b5383 (patch) | |
tree | fa83d3826d8c113b5ec273671ce6cab3d9fe5388 /src/op.h | |
parent | 119b5dc1975bfc00fb3f376e6ba28594dee12583 (diff) | |
download | fork-ledger-05c77351e458c08873c813264005f61f828b5383.tar.gz fork-ledger-05c77351e458c08873c813264005f61f828b5383.tar.bz2 fork-ledger-05c77351e458c08873c813264005f61f828b5383.zip |
Stopped using the generic "unsigned int" in favor of more specific types.
Diffstat (limited to 'src/op.h')
-rw-r--r-- | src/op.h | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -49,7 +49,7 @@ private: mutable short refc; ptr_op_t left_; - variant<unsigned int, // used by constant INDEX + variant<std::size_t, // used by constant INDEX value_t, // used by constant VALUE string, // used by constant IDENT mask_t, // used by constant MASK @@ -122,16 +122,16 @@ public: } bool is_index() const { - return data.type() == typeid(unsigned int); + return data.type() == typeid(std::size_t); } - unsigned int& as_index_lval() { + std::size_t& as_index_lval() { assert(kind == INDEX); - return boost::get<unsigned int>(data); + return boost::get<std::size_t>(data); } - const unsigned int& as_index() const { + const std::size_t& as_index() const { return const_cast<op_t *>(this)->as_index_lval(); } - void set_index(unsigned int val) { + void set_index(std::size_t val) { data = val; } |