@@ -13,14 +13,14 @@
|
||||
|
||||
#include "../safeguards.h"
|
||||
|
||||
int32 SimpleCountedObject::AddRef()
|
||||
int32_t SimpleCountedObject::AddRef()
|
||||
{
|
||||
return ++m_ref_cnt;
|
||||
}
|
||||
|
||||
int32 SimpleCountedObject::Release()
|
||||
int32_t SimpleCountedObject::Release()
|
||||
{
|
||||
int32 res = --m_ref_cnt;
|
||||
int32_t res = --m_ref_cnt;
|
||||
assert(res >= 0);
|
||||
if (res == 0) {
|
||||
try {
|
||||
|
@@ -196,7 +196,7 @@ template <class T> struct AdaptT {
|
||||
* @see misc/countedobj.cpp for implementation.
|
||||
*/
|
||||
struct SimpleCountedObject {
|
||||
int32 m_ref_cnt;
|
||||
int32_t m_ref_cnt;
|
||||
|
||||
SimpleCountedObject()
|
||||
: m_ref_cnt(0)
|
||||
@@ -205,8 +205,8 @@ struct SimpleCountedObject {
|
||||
virtual ~SimpleCountedObject()
|
||||
{}
|
||||
|
||||
virtual int32 AddRef();
|
||||
virtual int32 Release();
|
||||
virtual int32_t AddRef();
|
||||
virtual int32_t Release();
|
||||
virtual void FinalRelease() {};
|
||||
};
|
||||
|
||||
|
@@ -22,7 +22,7 @@ enum OptionDataFlags {
|
||||
struct OptionData {
|
||||
byte id; ///< Unique identification of this option data, often the same as #shortname.
|
||||
char shortname; ///< Short option letter if available, else use \c '\0'.
|
||||
uint16 flags; ///< Option data flags. @see OptionDataFlags
|
||||
uint16_t flags; ///< Option data flags. @see OptionDataFlags
|
||||
const char *longname; ///< Long option name including '-'/'--' prefix, use \c nullptr if not available.
|
||||
};
|
||||
|
||||
|
@@ -159,7 +159,7 @@ protected:
|
||||
/** static helper - return hash for the given key modulo number of slots */
|
||||
inline static int CalcHash(const Tkey &key)
|
||||
{
|
||||
uint32 hash = key.CalcHash();
|
||||
uint32_t hash = key.CalcHash();
|
||||
hash -= (hash >> 17); // hash * 131071 / 131072
|
||||
hash -= (hash >> 5); // * 31 / 32
|
||||
hash &= (1 << Thash_bits) - 1; // modulo slots
|
||||
|
Reference in New Issue
Block a user