mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-24 18:32:49 -06:00
ips_layer: Remove unnecessary explicit std::pair constructor in std::array
Makes the layout of the array consistent, by making all elements match, instead of special-casing the first one.
This commit is contained in:
parent
f7d2889fb4
commit
9ff743bc0a
1 changed files with 13 additions and 5 deletions
|
@ -22,11 +22,19 @@ enum class IPSFileType {
|
||||||
Error,
|
Error,
|
||||||
};
|
};
|
||||||
|
|
||||||
constexpr std::array<std::pair<const char*, const char*>, 11> ESCAPE_CHARACTER_MAP{
|
constexpr std::array<std::pair<const char*, const char*>, 11> ESCAPE_CHARACTER_MAP{{
|
||||||
std::pair{"\\a", "\a"}, {"\\b", "\b"}, {"\\f", "\f"}, {"\\n", "\n"},
|
{"\\a", "\a"},
|
||||||
{"\\r", "\r"}, {"\\t", "\t"}, {"\\v", "\v"}, {"\\\\", "\\"},
|
{"\\b", "\b"},
|
||||||
{"\\\'", "\'"}, {"\\\"", "\""}, {"\\\?", "\?"},
|
{"\\f", "\f"},
|
||||||
};
|
{"\\n", "\n"},
|
||||||
|
{"\\r", "\r"},
|
||||||
|
{"\\t", "\t"},
|
||||||
|
{"\\v", "\v"},
|
||||||
|
{"\\\\", "\\"},
|
||||||
|
{"\\\'", "\'"},
|
||||||
|
{"\\\"", "\""},
|
||||||
|
{"\\\?", "\?"},
|
||||||
|
}};
|
||||||
|
|
||||||
static IPSFileType IdentifyMagic(const std::vector<u8>& magic) {
|
static IPSFileType IdentifyMagic(const std::vector<u8>& magic) {
|
||||||
if (magic.size() != 5)
|
if (magic.size() != 5)
|
||||||
|
|
Loading…
Reference in a new issue