From 3c6f886d5a8bfd36c796b963d6e3178ad9577742 Mon Sep 17 00:00:00 2001 From: manuel Date: Wed, 13 May 2009 16:55:17 +0200 Subject: * added documentation (no more TODOs) * added testsuite + testcase * used copyctor instead of assign operator more often --- ue3/mycpu/instructions.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ue3/mycpu/instructions.cpp') diff --git a/ue3/mycpu/instructions.cpp b/ue3/mycpu/instructions.cpp index a6ac611..c2ce096 100644 --- a/ue3/mycpu/instructions.cpp +++ b/ue3/mycpu/instructions.cpp @@ -1,7 +1,7 @@ /** * @module instructions * @author Guenther Neuwirth (0626638), Manuel Mausz (0728348) - * @brief TODO + * @brief Implementations of CInstruction * @date 10.05.2009 */ @@ -162,7 +162,7 @@ void CInstructionLoad::execute(CCPU *cpu) { checkRegister(cpu, m_regidx1); checkRegister(cpu, m_regidx2); - CDat val = cpu->getRegisters()[ m_regidx2 ]; + CDat val(cpu->getRegisters()[ m_regidx2 ]); cpu->getRegisters()[ m_regidx1 ] = (*cpu->getMemory())[ val ]; } @@ -184,7 +184,7 @@ void CInstructionStore::execute(CCPU *cpu) { checkRegister(cpu, m_regidx1); checkRegister(cpu, m_regidx2); - CDat val = cpu->getRegisters()[ m_regidx2 ]; + CDat val(cpu->getRegisters()[ m_regidx2 ]); (*cpu->getMemory())[ val ] = cpu->getRegisters()[ m_regidx1 ]; } -- cgit v1.2.3