DSPTool: Generate an alignment specifier

alignas is a C++ keyword since C++11, and can be used in C with a header too (although I don't know the details).
This commit is contained in:
Pokechu22 2023-01-23 15:30:49 -08:00
parent e140516130
commit e391a28102
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ static std::string CodeToHeader(const std::vector<u16>& code, const std::string&
SplitPath(filename, nullptr, &filename_without_extension, nullptr);
header.append(fmt::format("const char* UCODE_NAMES[NUM_UCODES] = {{\"{}\"}};\n\n",
filename_without_extension));
header.append("const unsigned short dsp_code[NUM_UCODES][0x1000] = {\n");
header.append("alignas(0x20) const unsigned short dsp_code[NUM_UCODES][0x1000] = {\n");
header.append("\t{\n\t\t");
for (u32 j = 0; j < code_padded.size(); j++)