Changeset View
Changeset View
Standalone View
Standalone View
src/script/script.h
Show First 20 Lines • Show All 333 Lines • ▼ Show 20 Lines | inline CScriptNum &operator-=(const int64_t &rhs) { | ||||
return *this; | return *this; | ||||
} | } | ||||
inline CScriptNum &operator&=(const int64_t &rhs) { | inline CScriptNum &operator&=(const int64_t &rhs) { | ||||
m_value &= rhs; | m_value &= rhs; | ||||
return *this; | return *this; | ||||
} | } | ||||
inline CScriptNum &operator>>=(const int64_t &rhs) { | |||||
assert(rhs >= 0 && rhs < 64 && m_value >= 0); | |||||
m_value >>= rhs; | |||||
return *this; | |||||
} | |||||
int getint() const { | int getint() const { | ||||
if (m_value > std::numeric_limits<int>::max()) | if (m_value > std::numeric_limits<int>::max()) | ||||
return std::numeric_limits<int>::max(); | return std::numeric_limits<int>::max(); | ||||
else if (m_value < std::numeric_limits<int>::min()) | else if (m_value < std::numeric_limits<int>::min()) | ||||
return std::numeric_limits<int>::min(); | return std::numeric_limits<int>::min(); | ||||
return m_value; | return m_value; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 322 Lines • Show Last 20 Lines |