Return-Path: Delivered-To: apmail-incubator-qpid-commits-archive@locus.apache.org Received: (qmail 32707 invoked from network); 30 Jul 2008 06:29:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Jul 2008 06:29:52 -0000 Received: (qmail 51193 invoked by uid 500); 30 Jul 2008 06:29:51 -0000 Delivered-To: apmail-incubator-qpid-commits-archive@incubator.apache.org Received: (qmail 51183 invoked by uid 500); 30 Jul 2008 06:29:51 -0000 Mailing-List: contact qpid-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: qpid-dev@incubator.apache.org Delivered-To: mailing list qpid-commits@incubator.apache.org Received: (qmail 51174 invoked by uid 99); 30 Jul 2008 06:29:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jul 2008 23:29:51 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jul 2008 06:29:05 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 704EB23889C0; Tue, 29 Jul 2008 23:29:01 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r680919 - in /incubator/qpid/trunk/qpid/cpp/src/qpid/framing: Uuid.cpp Uuid.h Date: Wed, 30 Jul 2008 06:29:01 -0000 To: qpid-commits@incubator.apache.org From: astitcher@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080730062901.704EB23889C0@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: astitcher Date: Tue Jul 29 23:29:00 2008 New Revision: 680919 URL: http://svn.apache.org/viewvc?rev=680919&view=rev Log: QPID-1198 (adapted): Change use of uuid lib not to assume const parameters The Solaris version of uuid.h takes uint8_t* not const uint8_t* Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/framing/Uuid.cpp incubator/qpid/trunk/qpid/cpp/src/qpid/framing/Uuid.h Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/framing/Uuid.cpp URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/framing/Uuid.cpp?rev=680919&r1=680918&r2=680919&view=diff ============================================================================== --- incubator/qpid/trunk/qpid/cpp/src/qpid/framing/Uuid.cpp (original) +++ incubator/qpid/trunk/qpid/cpp/src/qpid/framing/Uuid.cpp Tue Jul 29 23:29:00 2008 @@ -38,7 +38,7 @@ buf.getRawData(c_array(), size()); } -ostream& operator<<(ostream& out, const Uuid& uuid) { +ostream& operator<<(ostream& out, Uuid uuid) { char unparsed[UNPARSED_SIZE + 1]; uuid_unparse(uuid.data(), unparsed); return out << unparsed; @@ -52,7 +52,7 @@ return in; } -std::string Uuid::str() const { +std::string Uuid::str() { std::ostringstream os; os << *this; return os.str(); Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/framing/Uuid.h URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/framing/Uuid.h?rev=680919&r1=680918&r2=680919&view=diff ============================================================================== --- incubator/qpid/trunk/qpid/cpp/src/qpid/framing/Uuid.h (original) +++ incubator/qpid/trunk/qpid/cpp/src/qpid/framing/Uuid.h Tue Jul 29 23:29:00 2008 @@ -42,10 +42,12 @@ Uuid(bool unique=false) { if (unique) generate(); else clear(); } /** Copy from 16 bytes of data. */ - Uuid(const uint8_t* data) { assign(data); } + Uuid(uint8_t* data) { assign(data); } /** Copy from 16 bytes of data. */ - void assign(const uint8_t* data) { uuid_copy(c_array(), data); } + void assign(uint8_t* data) { + uuid_copy(c_array(), data); + } /** Set to a new unique identifier. */ void generate() { uuid_generate(c_array()); } @@ -54,7 +56,9 @@ void clear() { uuid_clear(c_array()); } /** Test for null (all zeros). */ - bool isNull() const { return uuid_is_null(data()); } + bool isNull() { + return uuid_is_null(data()); + } // Default op= and copy ctor are fine. // boost::array gives us ==, < etc. @@ -64,7 +68,7 @@ void decode(framing::Buffer& buf); /** String value in format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb. */ - std::string str() const; + std::string str(); template void serialize(S& s) { s.raw(begin(), size()); @@ -72,7 +76,7 @@ }; /** Print in format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb. */ -std::ostream& operator<<(std::ostream&, const Uuid&); +std::ostream& operator<<(std::ostream&, Uuid); /** Read from format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb. */ std::istream& operator>>(std::istream&, Uuid&);