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:
@@ -19,14 +19,14 @@
|
||||
* a list of keycodes and a number to help identifying this hotkey.
|
||||
*/
|
||||
struct Hotkey {
|
||||
Hotkey(uint16 default_keycode, const std::string &name, int num);
|
||||
Hotkey(const std::vector<uint16> &default_keycodes, const std::string &name, int num);
|
||||
Hotkey(uint16_t default_keycode, const std::string &name, int num);
|
||||
Hotkey(const std::vector<uint16_t> &default_keycodes, const std::string &name, int num);
|
||||
|
||||
void AddKeycode(uint16 keycode);
|
||||
void AddKeycode(uint16_t keycode);
|
||||
|
||||
const std::string name;
|
||||
int num;
|
||||
std::set<uint16> keycodes;
|
||||
std::set<uint16_t> keycodes;
|
||||
};
|
||||
|
||||
struct IniFile;
|
||||
@@ -43,7 +43,7 @@ struct HotkeyList {
|
||||
void Load(IniFile *ini);
|
||||
void Save(IniFile *ini) const;
|
||||
|
||||
int CheckMatch(uint16 keycode, bool global_only = false) const;
|
||||
int CheckMatch(uint16_t keycode, bool global_only = false) const;
|
||||
|
||||
GlobalHotkeyHandlerFunc global_hotkey_handler;
|
||||
private:
|
||||
@@ -57,12 +57,12 @@ private:
|
||||
HotkeyList(const HotkeyList &other);
|
||||
};
|
||||
|
||||
bool IsQuitKey(uint16 keycode);
|
||||
bool IsQuitKey(uint16_t keycode);
|
||||
|
||||
void LoadHotkeysFromConfig();
|
||||
void SaveHotkeysToConfig();
|
||||
|
||||
|
||||
void HandleGlobalHotkeys(WChar key, uint16 keycode);
|
||||
void HandleGlobalHotkeys(char32_t key, uint16_t keycode);
|
||||
|
||||
#endif /* HOTKEYS_H */
|
||||
|
Reference in New Issue
Block a user