Changeset 55
Legend:
- Unmodified
- Added
- Removed
-
trunk/nv/common.hh
r15 r55 151 151 } // namespace nv 152 152 153 template <typename OBJ, typename T> 154 inline size_t offset_of(T OBJ::*ptr) 155 { 156 return ((size_t)&(((OBJ*)0)->*ptr)); 157 } 158 153 159 template <typename T, typename U> 154 T* down_cast(U* x)160 inline T* down_cast(U* x) 155 161 { 156 162 #if NV_DEBUG -
trunk/nv/types.hh
r54 r55 194 194 , flags( 0 ) 195 195 , offset( offsetof( TOBJECT, *field ) ) 196 // NOTE: if offsetof behaves badly, check offset_of in common.hh 196 197 { 197 198 flags =
Note: See TracChangeset
for help on using the changeset viewer.