mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-09 02:07:04 +08:00
chore: add clang-format and pre-commit configuration
This commit is contained in:
@@ -5,22 +5,17 @@
|
||||
|
||||
namespace Cubed {
|
||||
|
||||
|
||||
enum class GameMode {
|
||||
CREATIVE = 0,
|
||||
SPECTATOR
|
||||
};
|
||||
enum class GameMode { CREATIVE = 0, SPECTATOR };
|
||||
|
||||
inline std::string to_str(GameMode mode) {
|
||||
using enum GameMode;
|
||||
switch (mode) {
|
||||
case CREATIVE:
|
||||
return {"Creative"};
|
||||
case SPECTATOR:
|
||||
return {"Spective"};
|
||||
case CREATIVE:
|
||||
return {"Creative"};
|
||||
case SPECTATOR:
|
||||
return {"Spective"};
|
||||
}
|
||||
throw std::invalid_argument{"GameMode is invaild"};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
} // namespace Cubed
|
||||
Reference in New Issue
Block a user