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:
Rubidium
2023-05-08 19:01:06 +02:00
committed by rubidium42
parent 4f4810dc28
commit eaae0bb5e7
564 changed files with 4561 additions and 4561 deletions

View File

@@ -28,7 +28,7 @@ public:
/**
* The goal IDs.
*/
enum GoalID : uint16 {
enum GoalID : uint16_t {
/* Note: these values represent part of the in-game GoalID enum */
GOAL_INVALID = ::INVALID_GOAL, ///< An invalid goal id.
};
@@ -191,7 +191,7 @@ public:
* @pre question != null && len(question) != 0.
* @pre company == COMPANY_INVALID || ResolveCompanyID(company) != COMPANY_INVALID.
* @pre CountBits(buttons) >= 1 && CountBits(buttons) <= 3.
* @pre uniqueid >= 0 && uniqueid <= MAX(uint16)
* @pre uniqueid >= 0 && uniqueid <= MAX(uint16_t)
* @note Replies to the question are given by you via the event ScriptEventGoalQuestionAnswer.
* @note There is no guarantee you ever get a reply on your question.
*/
@@ -210,7 +210,7 @@ public:
* @pre question != null && len(question) != 0.
* @pre ResolveClientID(client) != CLIENT_INVALID.
* @pre CountBits(buttons) >= 1 && CountBits(buttons) <= 3.
* @pre uniqueid >= 0 && uniqueid <= MAX(uint16)
* @pre uniqueid >= 0 && uniqueid <= MAX(uint16_t)
* @note Replies to the question are given by you via the event ScriptEventGoalQuestionAnswer.
* @note There is no guarantee you ever get a reply on your question.
*/
@@ -221,7 +221,7 @@ public:
* @param uniqueid The uniqueid of the question you want to close.
* @return True if the action succeeded.
* @pre ScriptCompanyMode::IsDeity().
* @pre uniqueid >= 0 && uniqueid <= MAX(uint16)
* @pre uniqueid >= 0 && uniqueid <= MAX(uint16_t)
* @note If you send a question to a single company, and get a reply for them,
* the question is already closed on all clients. Only use this function if
* you want to timeout a question, or if you send the question to all
@@ -233,7 +233,7 @@ protected:
/**
* Does common checks and asks the question.
*/
static bool DoQuestion(SQInteger uniqueid, uint32 target, bool is_client, Text *question, QuestionType type, SQInteger buttons);
static bool DoQuestion(SQInteger uniqueid, uint32_t target, bool is_client, Text *question, QuestionType type, SQInteger buttons);
};
#endif /* SCRIPT_GOAL_HPP */