forked from eden-emu/eden
[icc] fix intel c++ compiler errors
This commit is contained in:
parent
18942b7ee0
commit
0e58324f71
9 changed files with 109 additions and 114 deletions
|
@ -2,24 +2,22 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <array>
|
||||
#include <string_view>
|
||||
|
||||
#include "shader_recompiler/exception.h"
|
||||
#include "shader_recompiler/frontend/maxwell/opcodes.h"
|
||||
|
||||
namespace Shader::Maxwell {
|
||||
namespace {
|
||||
constexpr std::array NAME_TABLE{
|
||||
|
||||
const char* NameOf(Opcode opcode) {
|
||||
constexpr const char* NAME_TABLE[] = {
|
||||
#define INST(name, cute, encode) cute,
|
||||
#include "maxwell.inc"
|
||||
#undef INST
|
||||
};
|
||||
} // Anonymous namespace
|
||||
|
||||
const char* NameOf(Opcode opcode) {
|
||||
if (static_cast<size_t>(opcode) >= NAME_TABLE.size()) {
|
||||
throw InvalidArgument("Invalid opcode with raw value {}", static_cast<int>(opcode));
|
||||
}
|
||||
return NAME_TABLE[static_cast<size_t>(opcode)];
|
||||
};
|
||||
if (size_t(opcode) >= sizeof(NAME_TABLE) / sizeof(NAME_TABLE[0]))
|
||||
throw InvalidArgument("Invalid opcode with raw value {}", int(opcode));
|
||||
return NAME_TABLE[size_t(opcode)];
|
||||
}
|
||||
|
||||
} // namespace Shader::Maxwell
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue