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:
@@ -30,8 +30,8 @@
|
||||
#include "safeguards.h"
|
||||
|
||||
struct EndGameHighScoreBaseWindow : Window {
|
||||
uint32 background_img;
|
||||
int8 rank;
|
||||
uint32_t background_img;
|
||||
int8_t rank;
|
||||
|
||||
EndGameHighScoreBaseWindow(WindowDesc *desc) : Window(desc)
|
||||
{
|
||||
@@ -70,7 +70,7 @@ struct EndGameHighScoreBaseWindow : Window {
|
||||
this->Close();
|
||||
}
|
||||
|
||||
EventState OnKeyPress(WChar key, uint16 keycode) override
|
||||
EventState OnKeyPress(char32_t key, uint16_t keycode) override
|
||||
{
|
||||
/* All keys are 'handled' by this window but we want to make
|
||||
* sure that 'quit' still works correctly. Not handling the
|
||||
@@ -158,7 +158,7 @@ struct EndGameWindow : EndGameHighScoreBaseWindow {
|
||||
struct HighScoreWindow : EndGameHighScoreBaseWindow {
|
||||
bool game_paused_by_player; ///< True if the game was paused by the player when the highscore window was opened.
|
||||
|
||||
HighScoreWindow(WindowDesc *desc, int difficulty, int8 ranking) : EndGameHighScoreBaseWindow(desc)
|
||||
HighScoreWindow(WindowDesc *desc, int difficulty, int8_t ranking) : EndGameHighScoreBaseWindow(desc)
|
||||
{
|
||||
/* pause game to show the chart */
|
||||
this->game_paused_by_player = _pause_mode == PM_PAUSED_NORMAL;
|
||||
@@ -233,7 +233,7 @@ static WindowDesc _endgame_desc(
|
||||
* endgame ranking is set to the top5 element that was newly added
|
||||
* and is thus highlighted
|
||||
*/
|
||||
void ShowHighscoreTable(int difficulty, int8 ranking)
|
||||
void ShowHighscoreTable(int difficulty, int8_t ranking)
|
||||
{
|
||||
CloseWindowByClass(WC_HIGHSCORE);
|
||||
new HighScoreWindow(&_highscore_desc, difficulty, ranking);
|
||||
|
Reference in New Issue
Block a user