[Scummvm-git-logs] scummvm master -> 38e422f874b2f90febb1647d81a1efed4bfce066
dreammaster
paulfgilbert at gmail.com
Fri Dec 14 04:55:53 CET 2018
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
38e422f874 GLK: FROTZ: Fix Visual Studio warnings about packing alignment
Commit: 38e422f874b2f90febb1647d81a1efed4bfce066
https://github.com/scummvm/scummvm/commit/38e422f874b2f90febb1647d81a1efed4bfce066
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-12-13T19:54:50-08:00
Commit Message:
GLK: FROTZ: Fix Visual Studio warnings about packing alignment
They were really bugging me, so I've changed the fixed size opcode
arrays to Common::Array, which fixes the warnings
Changed paths:
engines/glk/frotz/processor.cpp
engines/glk/frotz/processor.h
diff --git a/engines/glk/frotz/processor.cpp b/engines/glk/frotz/processor.cpp
index 8cfff9c..5553b04 100644
--- a/engines/glk/frotz/processor.cpp
+++ b/engines/glk/frotz/processor.cpp
@@ -176,8 +176,10 @@ Processor::Processor(OSystem *syst, const GlkGameDescription &gameDesc) :
&Processor::z_call_n
};
- Common::copy(&OP0_OPCODES[0], &OP0_OPCODES[16], op0_opcodes);
- Common::copy(&OP1_OPCODES[0], &OP1_OPCODES[16], op1_opcodes);
+ op0_opcodes.resize(16);
+ op1_opcodes.resize(16);
+ Common::copy(&OP0_OPCODES[0], &OP0_OPCODES[16], &op0_opcodes[0]);
+ Common::copy(&OP1_OPCODES[0], &OP1_OPCODES[16], &op1_opcodes[0]);
Common::fill(&_stack[0], &_stack[STACK_SIZE], 0);
Common::fill(&zargs[0], &zargs[8], 0);
Common::fill(&_buffer[0], &_buffer[TEXT_BUFFER_SIZE], '\0');
diff --git a/engines/glk/frotz/processor.h b/engines/glk/frotz/processor.h
index 5d6d448..9bb104c 100644
--- a/engines/glk/frotz/processor.h
+++ b/engines/glk/frotz/processor.h
@@ -53,11 +53,11 @@ typedef void (Processor::*Opcode)();
class Processor : public GlkInterface, public virtual Mem {
friend class Quetzal;
private:
- Opcode op0_opcodes[16];
- Opcode op1_opcodes[16];
static const char *const ERR_MESSAGES[ERR_NUM_ERRORS];
static Opcode var_opcodes[64];
static Opcode ext_opcodes[64];
+ Common::Array<Opcode> op0_opcodes;
+ Common::Array<Opcode> op1_opcodes;
int _finished;
zword zargs[8];
More information about the Scummvm-git-logs
mailing list