aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2011-03-03 16:34:23 +0100
committerMax Horn2011-03-03 16:38:26 +0100
commitee86d6eb613d2692490066f4c7fbb3912656f8e9 (patch)
tree5d3593e01458db901fa1a0a275d2e030fa3a74a5
parentd2acad39c87183c6b1debfbba1ded5127086557b (diff)
downloadscummvm-rg350-ee86d6eb613d2692490066f4c7fbb3912656f8e9.tar.gz
scummvm-rg350-ee86d6eb613d2692490066f4c7fbb3912656f8e9.tar.bz2
scummvm-rg350-ee86d6eb613d2692490066f4c7fbb3912656f8e9.zip
SCI: Make some reg_t methods private resp. inline
-rw-r--r--engines/sci/engine/vm_types.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/engines/sci/engine/vm_types.h b/engines/sci/engine/vm_types.h
index ac23bbe7dc..82c881d404 100644
--- a/engines/sci/engine/vm_types.h
+++ b/engines/sci/engine/vm_types.h
@@ -37,20 +37,20 @@ struct reg_t {
SegmentId segment;
uint16 offset;
- bool isNull() const {
- return !(offset || segment);
+ inline bool isNull() const {
+ return (offset | segment) == 0;
}
- uint16 toUint16() const {
+ inline uint16 toUint16() const {
return offset;
}
- int16 toSint16() const {
- return (int16) offset;
+ inline int16 toSint16() const {
+ return (int16)offset;
}
bool isNumber() const {
- return !segment;
+ return segment == 0;
}
bool isPointer() const {
@@ -60,7 +60,7 @@ struct reg_t {
uint16 requireUint16() const;
int16 requireSint16() const;
- bool isInitialized() const {
+ inline bool isInitialized() const {
return segment != 0xFFFF;
}
@@ -101,8 +101,6 @@ struct reg_t {
return ltU(right);
}
- bool pointerComparisonWithInteger(const reg_t right) const;
-
// Arithmetic operators
reg_t operator+(const reg_t right) const;
reg_t operator-(const reg_t right) const;
@@ -125,7 +123,9 @@ struct reg_t {
reg_t operator|(const reg_t right) const;
reg_t operator^(const reg_t right) const;
+private:
reg_t lookForWorkaround(const reg_t right) const;
+ bool pointerComparisonWithInteger(const reg_t right) const;
};
static inline reg_t make_reg(SegmentId segment, uint16 offset) {