Adding of _t to (u)int types, and WChar to char32_t

See: eaae0bb5e
This commit is contained in:
Jonathan G Rennison
2024-01-07 16:41:53 +00:00
parent 55d78a23be
commit 97e6f3062e
655 changed files with 7555 additions and 7555 deletions

View File

@@ -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 {

View File

@@ -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() {};
};

View File

@@ -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.
};

View File

@@ -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