From b7bc31df25274935c2c00f9afcc1aad37bd93354 Mon Sep 17 00:00:00 2001 From: "Charles E. Rolke" Date: Mon, 17 Oct 2011 20:55:17 +0000 Subject: QPID-2323 Add Uuid to variant This patch adds a const_cast to the Uuid buffer references. On Solaris the Uuid library calls take non-const args. See also r881679 for related Solaris fix-ups. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1185373 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/framing/Uuid.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cpp/src/qpid/framing') diff --git a/cpp/src/qpid/framing/Uuid.cpp b/cpp/src/qpid/framing/Uuid.cpp index 945c0a4d24..b3d1e2e1e4 100644 --- a/cpp/src/qpid/framing/Uuid.cpp +++ b/cpp/src/qpid/framing/Uuid.cpp @@ -59,7 +59,9 @@ void Uuid::clear() { // Force int 0/!0 to false/true; avoids compile warnings. bool Uuid::isNull() const { - return !!uuid_is_null(data()); + // This const cast is for Solaris which has a + // uuid_is_null that takes a non const argument + return !!uuid_is_null(const_cast(data())); } void Uuid::encode(Buffer& buf) const { -- cgit v1.2.1