You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2008/07/30 08:29:01 UTC
svn commit: r680919 - in /incubator/qpid/trunk/qpid/cpp/src/qpid/framing:
Uuid.cpp Uuid.h
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 <class S> 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&);