Move string array concatenation to format.h.
authorTeemu Murtola <teemu.murtola@gmail.com>
Thu, 26 Apr 2012 04:34:08 +0000 (07:34 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Thu, 26 Apr 2012 09:17:32 +0000 (12:17 +0300)
commit0a03fb486c6705ef71168d70292f7956543d33e5
tree33ac4ae8be03070d2df3ad351f4c83a61962352a
parente898bbc3d505e580b617e8c5bc0900964ab9e066
Move string array concatenation to format.h.

- Moved code from Options::setDescription() that concatenated strings
  from an array into format.h to make it more generally usable.
- Changed the code such that instead of requiring the array to be
  NULL-terminated, it can also deduce the length of the array passed as
  an argument.
- Made Options::setDescription() to take a simple string to allow using
  the alternative overload, and also to help in writing test code
  (for #666).

Change-Id: I96f45577fc6a4258a1c993983cc1d1a1a0846bdc
12 files changed:
share/template/template.cpp
src/gromacs/options/options.cpp
src/gromacs/options/options.h
src/gromacs/trajectoryanalysis.h
src/gromacs/trajectoryanalysis/modules/angle.cpp
src/gromacs/trajectoryanalysis/modules/distance.cpp
src/gromacs/trajectoryanalysis/modules/select.cpp
src/gromacs/trajectoryanalysis/tests/test_selection.cpp
src/gromacs/utility/format.cpp
src/gromacs/utility/format.h
src/gromacs/utility/tests/format.cpp
src/gromacs/utility/tests/refdata/ConcatenateStringsTest_HandlesDifferentStringEndings.xml [new file with mode: 0644]