summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibRegex/RegexDebug.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibRegex/RegexDebug.h')
-rw-r--r--Userland/Libraries/LibRegex/RegexDebug.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/Userland/Libraries/LibRegex/RegexDebug.h b/Userland/Libraries/LibRegex/RegexDebug.h
index 821870242b..ebe25d8ddb 100644
--- a/Userland/Libraries/LibRegex/RegexDebug.h
+++ b/Userland/Libraries/LibRegex/RegexDebug.h
@@ -39,19 +39,14 @@ public:
auto& bytecode = regex.parser_result.bytecode;
for (;;) {
- auto* opcode = bytecode.get_opcode(state);
- if (!opcode) {
- dbgln("Wrong opcode... failed!");
- return;
- }
-
- print_opcode("PrintBytecode", *opcode, state);
+ auto& opcode = bytecode.get_opcode(state);
+ print_opcode("PrintBytecode", opcode, state);
out(m_file, "{}", m_debug_stripline);
- if (is<OpCode_Exit>(*opcode))
+ if (is<OpCode_Exit>(opcode))
break;
- state.instruction_position += opcode->size();
+ state.instruction_position += opcode.size();
}
fflush(m_file);