Avoid double buffering when serializing the EDM
The C++ standard says std::vector should be a contiguous block of memory so this should work to remove the double buffer with no other changes.
@tbold Please feel free to close the MR if you don't like this way.
Edited by Adam Edward Barton