Tidy up some warnings I was getting in Input.hpp
parent
a8c9943ac9
commit
b3427ad737
|
@ -3,4 +3,6 @@ Build/
|
|||
.vs/
|
||||
.vscode/
|
||||
|
||||
CMakeSettings.json
|
||||
|
||||
Documentation/Build/
|
||||
|
|
|
@ -34,16 +34,27 @@
|
|||
|
||||
namespace phx
|
||||
{
|
||||
struct InputState : public phx::ISerializable
|
||||
struct InputState : ISerializable
|
||||
{
|
||||
bool forward{};
|
||||
bool backward{};
|
||||
bool left{};
|
||||
bool right{};
|
||||
bool up{};
|
||||
bool down{};
|
||||
math::vec2u rotation{}; // in 1/1000 degres
|
||||
std::size_t sequence{};
|
||||
Serializer& operator&(Serializer& this_) override;
|
||||
InputState() = default;
|
||||
virtual ~InputState() = default;
|
||||
|
||||
InputState(const InputState& other) = default;
|
||||
InputState& operator=(const InputState& other) = default;
|
||||
InputState(InputState&& other) = default;
|
||||
InputState& operator=(InputState&& other) = default;
|
||||
|
||||
bool forward = false;
|
||||
bool backward = false;
|
||||
bool left = false;
|
||||
bool right = false;
|
||||
bool up = false;
|
||||
bool down = false;
|
||||
|
||||
math::vec2u rotation; // in 1/1000 degrees
|
||||
|
||||
std::size_t sequence = 0;
|
||||
|
||||
Serializer& operator&(Serializer& serializer) override;
|
||||
};
|
||||
} // namespace phx
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
#include <Common/Input.hpp>
|
||||
|
||||
phx::Serializer& phx::InputState::operator&(phx::Serializer& this_)
|
||||
phx::Serializer& phx::InputState::operator&(phx::Serializer& serializer)
|
||||
{
|
||||
return this_ & forward & backward & left & right & up & down & rotation.x & rotation.y & sequence;
|
||||
return serializer & forward & backward & left & right & up & down & rotation.x & rotation.y & sequence;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue