[Scummvm-cvs-logs] scummvm master -> ee86d6eb613d2692490066f4c7fbb3912656f8e9
fingolfin
max at quendi.de
Thu Mar 3 17:07:10 CET 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
ee86d6eb61 SCI: Make some reg_t methods private resp. inline
Commit: ee86d6eb613d2692490066f4c7fbb3912656f8e9
https://github.com/scummvm/scummvm/commit/ee86d6eb613d2692490066f4c7fbb3912656f8e9
Author: Max Horn (max at quendi.de)
Date: 2011-03-03T07:38:26-08:00
Commit Message:
SCI: Make some reg_t methods private resp. inline
Changed paths:
engines/sci/engine/vm_types.h
diff --git a/engines/sci/engine/vm_types.h b/engines/sci/engine/vm_types.h
index ac23bbe..82c881d 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) {
More information about the Scummvm-git-logs
mailing list