Remove manual alignment from InMemorySerializer
commitcccc2a2d935f5bb0ee7782bc781bc1b6acb1a6c1
authorTeemu Murtola <teemu.murtola@gmail.com>
Sat, 11 Mar 2017 17:00:54 +0000 (11 19:00 +0200)
committerDavid van der Spoel <davidvanderspoel@gmail.com>
Mon, 13 Mar 2017 08:45:16 +0000 (13 09:45 +0100)
tree1a683a269daac071d6062c4d9d0228e9a37957d2
parent6910b30ab823bccece7035e39b9cefe42a9da868
Remove manual alignment from InMemorySerializer

This makes the serialized form more compact, and removes one source of
uncertainty on whether the code works in all possible scenarios.

Also, fix a case that seems to crash on Windows debug builds if a string
is serialized last, indexing the buffer beyond the end even though the
pointer is never dereferenced.

Change-Id: I95ffaefc2296dda1b4f9302003c90fac9ace2a9e
src/gromacs/utility/inmemoryserializer.cpp