Created
January 8, 2019 02:21
-
-
Save neheb/16b8f7787ebcd4b575ebb9e665982c8c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ibrdtn/data/Bundle.cpp b/ibrdtn/data/Bundle.cpp | |
index f515860..f000f3f 100644 | |
--- a/ibrdtn/data/Bundle.cpp | |
+++ b/ibrdtn/data/Bundle.cpp | |
@@ -71,11 +71,23 @@ namespace dtn | |
return other == (const PrimaryBlock&)(*this); | |
} | |
+ bool Bundle::operator!=(const BundleID& other) const | |
+ { | |
+ return !(other == (const PrimaryBlock&)(*this)); | |
+// return (const PrimaryBlock&)(*this) != (const PrimaryBlock&)other; | |
+ } | |
+ | |
bool Bundle::operator==(const MetaBundle& other) const | |
{ | |
return other == (const PrimaryBlock&)(*this); | |
} | |
+ bool Bundle::operator!=(const MetaBundle& other) const | |
+ { | |
+ return !(other == (const PrimaryBlock&)(*this)); | |
+// return (const PrimaryBlock&)(*this) != (const PrimaryBlock&)other; | |
+ } | |
+ | |
bool Bundle::operator!=(const Bundle& other) const | |
{ | |
return (const PrimaryBlock&)(*this) != (const PrimaryBlock&)other; | |
diff --git a/ibrdtn/data/Bundle.h b/ibrdtn/data/Bundle.h | |
index 036a2a6..6a4ea47 100644 | |
--- a/ibrdtn/data/Bundle.h | |
+++ b/ibrdtn/data/Bundle.h | |
@@ -69,6 +69,9 @@ namespace dtn | |
bool operator==(const dtn::data::block_t &type) const { | |
return (**this) == type; | |
} | |
+ bool operator!=(const dtn::data::block_t &type) const { | |
+ return !((**this) == type); | |
+ } | |
}; | |
typedef std::list<block_elem> block_list; | |
@@ -94,7 +97,9 @@ namespace dtn | |
virtual ~Bundle(); | |
bool operator==(const BundleID& other) const; | |
+ bool operator!=(const BundleID& other) const; | |
bool operator==(const MetaBundle& other) const; | |
+ bool operator!=(const MetaBundle& other) const; | |
bool operator==(const Bundle& other) const; | |
bool operator!=(const Bundle& other) const; | |
diff --git a/ibrdtn/data/BundleMerger.cpp b/ibrdtn/data/BundleMerger.cpp | |
index 1cd20c5..b71a084 100644 | |
--- a/ibrdtn/data/BundleMerger.cpp | |
+++ b/ibrdtn/data/BundleMerger.cpp | |
@@ -119,7 +119,7 @@ namespace dtn | |
} | |
ibrcommon::BLOB::iostream stream = c._blob.iostream(); | |
- (*stream).seekp(obj.fragmentoffset.get<std::streampos>()); | |
+ (*stream).seekp(obj.fragmentoffset.get<std::streamoff>()); | |
const dtn::data::PayloadBlock &p = obj.find<dtn::data::PayloadBlock>(); | |
const Length plength = p.getLength(); | |
diff --git a/ibrdtn/data/Dictionary.cpp b/ibrdtn/data/Dictionary.cpp | |
index 6299e66..208f904 100644 | |
--- a/ibrdtn/data/Dictionary.cpp | |
+++ b/ibrdtn/data/Dictionary.cpp | |
@@ -154,11 +154,11 @@ namespace dtn | |
{ | |
char buffer[1024]; | |
- _bytestream.seekg(scheme.get<std::streampos>()); | |
+ _bytestream.seekg(scheme.get<std::streamoff>()); | |
_bytestream.get(buffer, 1024, '\0'); | |
std::string scheme_str(buffer); | |
- _bytestream.seekg(ssp.get<std::streampos>()); | |
+ _bytestream.seekg(ssp.get<std::streamoff>()); | |
_bytestream.get(buffer, 1024, '\0'); | |
std::string ssp_str(buffer); | |
diff --git a/ibrdtn/data/MemoryBundleSet.cpp b/ibrdtn/data/MemoryBundleSet.cpp | |
index 987342e..b67fdd3 100644 | |
--- a/ibrdtn/data/MemoryBundleSet.cpp | |
+++ b/ibrdtn/data/MemoryBundleSet.cpp | |
@@ -134,7 +134,7 @@ namespace dtn | |
// the bundles set. This happen if the MemoryBundleSet gets deserialized. | |
if (!_consistent) return true; | |
- bundle_set::iterator iter = _bundles.find(dtn::data::MetaBundle::create(bundle)); | |
+ bundle_set::const_iterator iter = _bundles.find(dtn::data::MetaBundle::create(bundle)); | |
return (iter != _bundles.end()); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment