mirror of https://github.com/stella-emu/stella.git
Add extra warning about using brace initialization on json when we shouldn't.
This commit is contained in:
parent
496848d3a3
commit
eb6d854599
|
@ -14,6 +14,12 @@
|
||||||
|
|
||||||
6.6 to 6.7 (June 6, 2022)
|
6.6 to 6.7 (June 6, 2022)
|
||||||
|
|
||||||
|
* IMPORTANT NOTES:
|
||||||
|
- Because of fixes to JSON handling, all remappings will be reset
|
||||||
|
to defaults; if you had custom mappings, they will need to be
|
||||||
|
re-entered again.
|
||||||
|
- Because of internal changes, all state files are now invalid.
|
||||||
|
|
||||||
* Completely reworked the file launcher:
|
* Completely reworked the file launcher:
|
||||||
- Redesigned user interface
|
- Redesigned user interface
|
||||||
- Added tracking of user favorites, recently played and most popular
|
- Added tracking of user favorites, recently played and most popular
|
||||||
|
|
|
@ -49,6 +49,10 @@ class PhysicalJoystickHandler
|
||||||
private:
|
private:
|
||||||
struct StickInfo
|
struct StickInfo
|
||||||
{
|
{
|
||||||
|
// NOTE: For all future linting exercises
|
||||||
|
// Make sure to *NEVER* use brace initialization or std::move
|
||||||
|
// on the 'mapping' instance variable; there lay dragons ...
|
||||||
|
// https://json.nlohmann.me/home/faq/#brace-initialization-yields-arrays
|
||||||
explicit StickInfo(nlohmann::json map, PhysicalJoystickPtr stick = nullptr)
|
explicit StickInfo(nlohmann::json map, PhysicalJoystickPtr stick = nullptr)
|
||||||
: mapping(map), joy{std::move(stick)} {}
|
: mapping(map), joy{std::move(stick)} {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue