Adjusted workflow.
This commit is contained in:
50
src/io/hid/Button.cpp
Normal file
50
src/io/hid/Button.cpp
Normal file
@@ -0,0 +1,50 @@
|
||||
#include "ehs/io/hid/Button.h"
|
||||
|
||||
namespace ehs
|
||||
{
|
||||
Button::Button()
|
||||
: hash(0)
|
||||
{
|
||||
}
|
||||
|
||||
Button::Button(const Str_8& name)
|
||||
: name(name), hash(name.Hash_32())
|
||||
{
|
||||
}
|
||||
|
||||
Button::Button(const Button& key)
|
||||
: name(key.name), hash(key.hash)
|
||||
{
|
||||
}
|
||||
|
||||
Button& Button::operator=(const Button& key)
|
||||
{
|
||||
if (this == &key)
|
||||
return *this;
|
||||
|
||||
name = key.name;
|
||||
hash = key.hash;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool Button::operator==(const Button& key) const
|
||||
{
|
||||
return key.hash == hash;
|
||||
}
|
||||
|
||||
bool Button::operator!=(const Button& key) const
|
||||
{
|
||||
return key.hash != hash;
|
||||
}
|
||||
|
||||
Str_8 Button::GetName() const
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
UInt_32 Button::GetHash() const
|
||||
{
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user