mirror of https://github.com/AxioDL/metaforce.git
STRG: Convert file-scope std::vector to std::array
Eliminates a runtime-static constructor and heap allocation at program start.
This commit is contained in:
parent
16c37abf79
commit
96fa7af8b5
|
@ -1,10 +1,14 @@
|
|||
#include "STRG.hpp"
|
||||
|
||||
#include <array>
|
||||
|
||||
#include "DNAMP1.hpp"
|
||||
|
||||
namespace DataSpec::DNAMP1 {
|
||||
|
||||
const std::vector<FourCC> skLanguages = {FOURCC('ENGL'), FOURCC('FREN'), FOURCC('GERM'), FOURCC('SPAN'),
|
||||
FOURCC('ITAL'), FOURCC('DUTC'), FOURCC('JAPN')};
|
||||
constexpr std::array skLanguages{
|
||||
FOURCC('ENGL'), FOURCC('FREN'), FOURCC('GERM'), FOURCC('SPAN'), FOURCC('ITAL'), FOURCC('DUTC'), FOURCC('JAPN'),
|
||||
};
|
||||
|
||||
static uint32_t ParseTag(const char16_t* str) {
|
||||
char parseStr[9];
|
||||
|
|
Loading…
Reference in New Issue