diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2012-05-24 04:14:37 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2012-05-24 04:14:37 +0000 |
| commit | 985967e9cbea31050df52c09b4779671cf8da365 (patch) | |
| tree | 0921a16a4102cce2f35519577add6703b00f013c /cpp/src/tests/Uuid.cpp | |
| parent | afadf76e64d735239b803b1aef7018bb17c8b11e (diff) | |
| download | qpid-python-985967e9cbea31050df52c09b4779671cf8da365.tar.gz | |
NO-JIRA: Remove final vestiges of non-portable alloca().
Fixed unit_test changes to avoid incorrect array initialisation.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1342135 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/Uuid.cpp')
| -rw-r--r-- | cpp/src/tests/Uuid.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cpp/src/tests/Uuid.cpp b/cpp/src/tests/Uuid.cpp index d7d1f00e3c..aa9580e25e 100644 --- a/cpp/src/tests/Uuid.cpp +++ b/cpp/src/tests/Uuid.cpp @@ -19,7 +19,6 @@ #include "qpid/framing/Uuid.h" #include "qpid/framing/Buffer.h" #include "qpid/types/Uuid.h" -#include "qpid/sys/alloca.h" #include "unit_test.h" @@ -97,12 +96,12 @@ QPID_AUTO_TEST_CASE(testUuidIOstream) { } QPID_AUTO_TEST_CASE(testUuidEncodeDecode) { - char* buff = static_cast<char*>(::alloca(Uuid::size())); - Buffer wbuf(buff, Uuid::size()); + std::vector<char> buff(Uuid::size()); + Buffer wbuf(&buff[0], Uuid::size()); Uuid uuid(sample.c_array()); uuid.encode(wbuf); - Buffer rbuf(buff, Uuid::size()); + Buffer rbuf(&buff[0], Uuid::size()); Uuid decoded; decoded.decode(rbuf); BOOST_CHECK_EQUAL(string(sample.begin(), sample.end()), |
