Files
ashlar/apps/openmw/mwinput/controlswitch.hpp
Sergei Trofimovich 7921f71a79 Fix gcc-13 build failures: missing <cstdint> includes
Without the change build fails on `gcc-13` as:

    In file included from /build/source/components/misc/stringops.hpp:8,
                     from /build/source/components/settings/settings.cpp:6:
    /build/source/components/misc/utf8stream.hpp:11:13: error: 'uint32_t' does not name a type
       11 |     typedef uint32_t UnicodeChar;
          |             ^~~~~~~~
    /build/source/components/misc/utf8stream.hpp:5:1: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
        4 | #include <cstring>
      +++ |+#include <cstdint>
2024-02-10 17:27:29 +00:00

40 lines
712 B
C++

#ifndef MWINPUT_CONTROLSWITCH_H
#define MWINPUT_CONTROLSWITCH_H
#include <cstdint>
#include <map>
#include <string>
namespace ESM
{
struct ControlsState;
class ESMReader;
class ESMWriter;
}
namespace Loading
{
class Listener;
}
namespace MWInput
{
class ControlSwitch
{
public:
ControlSwitch();
bool get(const std::string& key);
void set(const std::string& key, bool value);
void clear();
void write(ESM::ESMWriter& writer, Loading::Listener& progress);
void readRecord(ESM::ESMReader& reader, uint32_t type);
int countSavedGameRecords() const;
private:
std::map<std::string, bool> mSwitches;
};
}
#endif