X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fhla%2FHLAEnumeratedDataType.cxx;h=9edb9bf0db9cabff2969968e5b4d50898074702d;hb=d4db4fcac304c44e97d8db51f94cd25117b3956d;hp=56fd34dddc6d42e3ed246414e6283dde2de6f9ff;hpb=252a539e69bda7cf8cf0c5198f25f38b0a710ee2;p=simgear.git diff --git a/simgear/hla/HLAEnumeratedDataType.cxx b/simgear/hla/HLAEnumeratedDataType.cxx index 56fd34dd..9edb9bf0 100644 --- a/simgear/hla/HLAEnumeratedDataType.cxx +++ b/simgear/hla/HLAEnumeratedDataType.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2009 - 2010 Mathias Froehlich - Mathias.Froehlich@web.de +// Copyright (C) 2009 - 2012 Mathias Froehlich - Mathias.Froehlich@web.de // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -15,6 +15,12 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + #include "HLAEnumeratedDataType.hxx" #include @@ -176,5 +182,14 @@ HLAEnumeratedDataType::setRepresentation(HLABasicDataType* representation) _map.swap(representationVisitor._map); } +void +HLAEnumeratedDataType::_recomputeAlignmentImplementation() +{ + unsigned alignment = 1; + if (const HLADataType* dataType = getRepresentation()) + alignment = std::max(alignment, dataType->getAlignment()); + setAlignment(alignment); +} + } // namespace simgear