Combine namespaces

This commit is contained in:
prisixia 2023-05-04 10:54:08 +02:00
parent 6a7d8c91cf
commit a112f790b3
Signed by: prisixia
GPG Key ID: CB939A148C9B4125
7 changed files with 14 additions and 28 deletions

View File

@ -40,8 +40,7 @@ along with speciesgen. If not, see <https://www.gnu.org/licenses/>.
#include "cereal/types/string.hpp"
#include "cereal/types/vector.hpp"
namespace Starbound {
namespace Frames {
namespace Starbound::Frames {
class Grid {
public:
Grid(const std::vector<std::vector<std::optional<std::string>>>,
@ -74,8 +73,7 @@ private:
std::unordered_map<std::string, std::string> m_aliases;
Grid m_grid;
};
} // namespace Frames
} // namespace Starbound
} // namespace Starbound::Frames
//----------------------------------------------------------------------
// Serialisation

View File

@ -38,8 +38,7 @@ along with speciesgen. If not, see <https://www.gnu.org/licenses/>.
#include "cereal/types/string.hpp"
#include "magic_enum.hpp"
namespace Starbound {
namespace Item {
namespace Starbound::Item {
enum class Rarity {
Common = 0,
Uncommon = 1,
@ -112,8 +111,7 @@ private:
Frames m_maleFrames;
Frames m_femaleFrames;
};
} // namespace Item
} // namespace Starbound
} // namespace Starbound::Item
//----------------------------------------------------------------------
// Serialisation

View File

@ -36,8 +36,7 @@ along with speciesgen. If not, see <https://www.gnu.org/licenses/>.
#include "magic_enum.hpp"
namespace Starbound {
namespace Patch {
namespace Starbound::Patch {
enum class Operation {
Test = 0,
Add = 1,
@ -68,8 +67,7 @@ private:
std::filesystem::path m_path;
Value m_value;
};
} // namespace Patch
} // namespace Starbound
} // namespace Starbound::Patch
//----------------------------------------------------------------------
// Serialisation

View File

@ -35,8 +35,7 @@ along with speciesgen. If not, see <https://www.gnu.org/licenses/>.
#include "magic_enum.hpp"
namespace Starpounds {
namespace Types {
namespace Starpounds::Types {
enum class Chests { Chest = 0, Bust = 1, Belly = 2, Arms = 3 };
enum class Legs { Legs = 0, Body = 1 };
@ -56,7 +55,6 @@ enum class Subs {
std::string AsString(const Subs);
std::string AsFriendly(const Subs);
Chests AsChest(const Subs);
} // namespace Types
} // namespace Starpounds
} // namespace Starpounds::Types
#endif // SPECIESGEN_STARPOUNDS_SUBS_H

View File

@ -20,8 +20,7 @@ along with speciesgen. If not, see <https://www.gnu.org/licenses/>.
#include "starbound/frames.h"
namespace Starbound {
namespace Frames {
namespace Starbound::Frames {
//----------------------------------------------------------------------
// Grid
@ -73,5 +72,4 @@ void Frames::SetAliases(
}
void Frames::SetGrid(const Grid grid) { m_grid = grid; }
} // namespace Frames
} // namespace Starbound
} // namespace Starbound::Frames

View File

@ -20,8 +20,7 @@ along with speciesgen. If not, see <https://www.gnu.org/licenses/>.
#include "starbound/item.h"
namespace Starbound {
namespace Item {
namespace Starbound::Item {
//----------------------------------------------------------------------
// Frames
@ -115,5 +114,4 @@ void Item::SetMaleFrames(const Frames maleFrames) { m_maleFrames = maleFrames; }
void Item::SetFemaleFrames(const Frames femaleFrames) {
m_femaleFrames = femaleFrames;
}
} // namespace Item
} // namespace Starbound
} // namespace Starbound::Item

View File

@ -20,8 +20,7 @@ along with speciesgen. If not, see <https://www.gnu.org/licenses/>.
#include "starpounds/types.h"
namespace Starpounds {
namespace Types {
namespace Starpounds::Types {
std::string AsString(const Subs type) {
std::string type_str =
static_cast<std::string>(magic_enum::enum_name(type));
@ -51,5 +50,4 @@ Chests AsChest(const Subs type) {
return Chests::Belly;
}
}
} // namespace Types
} // namespace Starpounds
} // namespace Starpounds::Types