Commit graph

18226 commits

Author SHA1 Message Date
Joris Dauphin
372b292930
Merge pull request #484 from Wargus/proj
Improve `ranges::find` to support projection.
2023-09-04 13:19:33 +02:00
Jarod42
9a12d44e82 Improve ranges::find to support projection. 2023-09-04 02:26:19 +02:00
Joris Dauphin
7ff1df4999
Merge pull request #483 from Wargus/reference
`PopupByIdent` return by reference.
2023-09-03 22:47:46 +02:00
Jarod42
70ce930b1f PopupByIdent return by reference. 2023-09-03 20:40:49 +02:00
Joris Dauphin
36b2f8813c
Merge pull request #482 from Wargus/reference
Use reference for SpellTypeByIdent
2023-09-01 14:11:03 +02:00
Jarod42
d1eb95fca2 Use reference for SpellTypeByIdent 2023-08-30 21:57:31 +02:00
Joris Dauphin
566e142c91
Merge pull request #481 from Wargus/unittypebyident
Unittypebyident
2023-08-30 13:57:40 +02:00
Jarod42
b3b2a3539a Fix code thanks to gcc. 2023-08-30 13:05:49 +02:00
Jarod42
4af7f30f75 Fix "$(race)-group" handling. 2023-08-30 12:31:48 +02:00
Jarod42
ec92030a53 Use reference for UnitTypeByIdent. 2023-08-30 11:54:19 +02:00
Joris Dauphin
e05b7d7034
Merge pull request #480 from Wargus/string_view
string_view for `CFont *Get(std::string_view ident)`.
2023-08-29 21:25:44 +02:00
Jarod42
d0fc281f0c string_view for CFont *Get(std::string_view ident). 2023-08-29 16:10:02 +02:00
Joris Dauphin
0ae9e642bc
Merge pull request #478 from Wargus/string_view
String view
2023-08-28 15:12:13 +02:00
Jarod42
b3cd88a2cb LuaToString returns std::string_view. 2023-08-28 11:00:24 +02:00
Jarod42
6ab90390c0 Use std::string_view in CclSavedGameInfo. (replace strcpy_s). 2023-08-28 11:00:24 +02:00
Jarod42
fc15675c25 Use std::string_view in CclFilteredListDirectory. 2023-08-28 11:00:23 +02:00
Jarod42
ce6f0f6df5 Use std::string for LibraryFileName (not is_transparent for std::unordered_map). 2023-08-28 11:00:23 +02:00
Jarod42
b5f74a4bf4 Use std::string (need nul-terminated string :/ ) for CHost. 2023-08-28 10:59:57 +02:00
Joris Dauphin
c850ae74e4
Merge pull request #477 from Wargus/string_view
String view
2023-08-27 12:18:03 +02:00
Jarod42
e09ce005bd More std::string_view: CAnimation::Init(std::string_view s, lua_State *l = nullptr). 2023-08-26 15:38:07 +02:00
Jarod42
a128d02ae5 More std::string_view. (ParseAnimInt) 2023-08-26 10:49:32 +02:00
Joris Dauphin
3e32664045
Merge pull request #476 from Wargus/to_number
Use `from_chars`
2023-08-25 12:31:46 +02:00
Jarod42
0f31aaad3b Handle compiler version with not full C++17 support. 2023-08-25 11:24:36 +02:00
Jarod42
c4c77181d4 Use from_chars ()wrapped into to_number for all string to int conversion. 2023-08-22 13:46:39 +02:00
Jarod42
7b8dafc986 Use std::clamp to implement clamp. 2023-08-20 13:44:10 +02:00
Jarod42
d81431c1da rename consist into contains. 2023-08-20 13:44:10 +02:00
Jarod42
05ebbd6898 strnlen only (possibly) used in util.cpp 2023-08-20 13:44:10 +02:00
Jarod42
ffbbc70511 More string_view 2023-08-20 11:23:59 +02:00
Jarod42
13dbba8d85 Use more std::string_view. 2023-08-19 13:45:03 +02:00
Jarod42
f0ca587d61 new cannot return nullptr(it throws when there is no memory). 2023-08-18 23:54:25 +02:00
Jarod42
5dd0470ac6 More std::string_view. 2023-08-18 21:15:59 +02:00
Joris Dauphin
c1cbd52839
Merge pull request #470 from Wargus/string_view
String view
2023-08-16 19:01:55 +02:00
Jarod42
9022440c36 Use std::string_view in video/font.cpp 2023-08-16 16:26:17 +02:00
Jarod42
63499b1aba Even more std::string_view.
Use transparent comparer (`std::less<>`) for `std::map<std::string, T>`.
2023-08-16 15:55:50 +02:00
Jarod42
a47b12e583 Even more std::string_view:
- use transparent comparer in map.
2023-08-16 11:27:01 +02:00
Joris Dauphin
96ba028dfd
Merge pull request #469 from Wargus/string_view
Cleanup actions
2023-08-16 09:19:22 +02:00
Jarod42
eebea8bbab cleanup actions:
- `std::string_view`
- `override`
2023-08-15 23:41:01 +02:00
Joris Dauphin
a1dd6e70b5
Merge pull request #468 from Wargus/string_view
Use more `std::string_view`.
2023-08-15 15:05:58 +02:00
Jarod42
3c8672c9b0 Use more std::string_view. 2023-08-15 14:13:57 +02:00
Joris Dauphin
fad8d14bbd
Merge pull request #467 from Wargus/string_view
Use some `std::string_view`.
2023-08-15 10:17:29 +02:00
Jarod42
9ed29d2f08 Use some std::string_view. 2023-08-15 01:54:43 +02:00
Joris Dauphin
1d38b6c511
Merge pull request #466 from Wargus/enum
Use even more enum class
2023-08-14 22:58:44 +02:00
Jarod42
949828d646 enum class for MissileClass. 2023-08-14 19:13:32 +02:00
Jarod42
7a19597bbe Use enum class ClfType. 2023-08-14 14:59:12 +02:00
Jarod42
d8360a3ce5 Use enum class for ECursorOn (renamed from _cursor_on_). 2023-08-14 14:50:11 +02:00
Joris Dauphin
3858165c4f
Merge pull request #465 from Wargus/enum
Use even more enum class
2023-08-14 14:16:17 +02:00
Jarod42
cc11b81ce2 Replace some #define by constexpr 2023-08-14 12:41:17 +02:00
Jarod42
00178a3fe4 enum class for EKeyState (renamed from _key_state_). 2023-08-14 11:47:27 +02:00
Jarod42
ad64288672 enum class for IfaceState (renamed from _iface_state_) 2023-08-14 11:35:33 +02:00
Jarod42
1c87b7e58d enum class for ButtonArea(renamed from _button_area_). 2023-08-13 20:55:59 +02:00