Permalink
Browse files

CRYO: Stop packing struct containing pointers

This struct packing causes the pointer-to-member-function to become
unaligned, and does not seem necessary in any way.

Closes gh-1081.
  • Loading branch information...
csnover committed Nov 8, 2017
1 parent 93935a7 commit 10f1eab3c9f07390eb0e437948e4dfb3a927c93e
Showing with 0 additions and 2 deletions.
  1. +0 −2 engines/cryo/eden.cpp
View
@@ -3126,13 +3126,11 @@ void EdenGame::tyranDies(perso_t *perso) {
}
void EdenGame::specialObjects(perso_t *perso, char objid) {
#pragma pack(push, 1)
struct SpecialObject {
int8 _characterType;
int8 _objectId;
void (EdenGame::*dispFct)(perso_t *perso);
};
#pragma pack(pop)
static SpecialObject kSpecialObjectActions[] = {
// persoType, objectId, dispFct

0 comments on commit 10f1eab

Please sign in to comment.