Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
This commit is contained in:
@@ -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