From 70db1564a4191452448a59d6a6b8ae8abbea41aa Mon Sep 17 00:00:00 2001 From: Johannes Muenzel Date: Tue, 7 Oct 2014 00:07:09 -0400 Subject: [PATCH] Change g_opcodes to OPCODES (style warning) --- src/instruction.rs | 2 +- src/machine.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/instruction.rs b/src/instruction.rs index 45d0e99..9112db2 100644 --- a/src/instruction.rs +++ b/src/instruction.rs @@ -256,7 +256,7 @@ impl AddressingMode { pub type DecodedInstr = (Instruction, AMOut); -pub static g_opcodes: [Option<(Instruction, AddressingMode)>, ..256] = [ +pub static OPCODES: [Option<(Instruction, AddressingMode)>, ..256] = [ /*0x00*/ Some((BRK, Implied)), /*0x01*/ Some((ORA, IndexedIndirectX)), /*0x02*/ None, diff --git a/src/machine.rs b/src/machine.rs index e9f70f9..48a7d4e 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -56,7 +56,7 @@ impl Machine { pub fn fetch_next_and_decode(&mut self) -> Option { let x: u8 = self.memory.get_byte(self.registers.program_counter); - match instruction::g_opcodes[x as uint] { + match instruction::OPCODES[x as uint] { Some((instr, am)) => { let extra_bytes = am.extra_bytes(); let num_bytes = AddressDiff(1) + extra_bytes;