mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-12-24 16:51:06 +00:00
Simplify checking for !<integer> first word.
This commit is contained in:
parent
a08350a2c3
commit
92a225b371
@ -540,9 +540,7 @@ spv_result_t spvTextEncodeOpcode(
|
||||
spvCheck(error, DIAGNOSTIC << "Internal Error"; return error);
|
||||
|
||||
// NOTE: Handle insertion of an immediate integer into the binary stream
|
||||
bool immediate = false;
|
||||
spvCheck('!' == text->str[position->index], immediate = true);
|
||||
if (immediate) {
|
||||
if ('!' == text->str[position->index]) {
|
||||
const char *begin = opcodeName.data() + 1;
|
||||
char *end = nullptr;
|
||||
uint32_t immediateInt = strtoul(begin, &end, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user