You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.6 KiB

  1. From a5b9c2feeaabbd90c9734c5d865d471eed0d5e3a Mon Sep 17 00:00:00 2001
  2. From: Rosen Penev <rosenp@gmail.com>
  3. Date: Thu, 28 Mar 2019 01:55:15 -0700
  4. Subject: [PATCH] Add operator!=() to BundleID and MetaBundle
  5. Needed for uClibc++.
  6. Signed-off-by: Rosen Penev <rosenp@gmail.com>
  7. ---
  8. ibrdtn/data/Bundle.cpp | 10 ++++++++++
  9. ibrdtn/data/Bundle.h | 2 ++
  10. 2 files changed, 12 insertions(+)
  11. diff --git a/ibrdtn/data/Bundle.cpp b/ibrdtn/data/Bundle.cpp
  12. index f515860..943544e 100644
  13. --- a/ibrdtn/data/Bundle.cpp
  14. +++ b/ibrdtn/data/Bundle.cpp
  15. @@ -71,11 +71,21 @@ namespace dtn
  16. return other == (const PrimaryBlock&)(*this);
  17. }
  18. + bool Bundle::operator!=(const BundleID& other) const
  19. + {
  20. + return other != (const PrimaryBlock&)(*this);
  21. + }
  22. +
  23. bool Bundle::operator==(const MetaBundle& other) const
  24. {
  25. return other == (const PrimaryBlock&)(*this);
  26. }
  27. + bool Bundle::operator!=(const MetaBundle& other) const
  28. + {
  29. + return other != (const PrimaryBlock&)(*this);
  30. + }
  31. +
  32. bool Bundle::operator!=(const Bundle& other) const
  33. {
  34. return (const PrimaryBlock&)(*this) != (const PrimaryBlock&)other;
  35. diff --git a/ibrdtn/data/Bundle.h b/ibrdtn/data/Bundle.h
  36. index 9bbc066..6a4ea47 100644
  37. --- a/ibrdtn/data/Bundle.h
  38. +++ b/ibrdtn/data/Bundle.h
  39. @@ -97,7 +97,9 @@ namespace dtn
  40. virtual ~Bundle();
  41. bool operator==(const BundleID& other) const;
  42. + bool operator!=(const BundleID& other) const;
  43. bool operator==(const MetaBundle& other) const;
  44. + bool operator!=(const MetaBundle& other) const;
  45. bool operator==(const Bundle& other) const;
  46. bool operator!=(const Bundle& other) const;