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.

49 lines
1.4 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. --- a/ibrdtn/data/Bundle.cpp
  12. +++ b/ibrdtn/data/Bundle.cpp
  13. @@ -71,11 +71,21 @@ namespace dtn
  14. return other == (const PrimaryBlock&)(*this);
  15. }
  16. + bool Bundle::operator!=(const BundleID& other) const
  17. + {
  18. + return other != (const PrimaryBlock&)(*this);
  19. + }
  20. +
  21. bool Bundle::operator==(const MetaBundle& other) const
  22. {
  23. return other == (const PrimaryBlock&)(*this);
  24. }
  25. + bool Bundle::operator!=(const MetaBundle& other) const
  26. + {
  27. + return other != (const PrimaryBlock&)(*this);
  28. + }
  29. +
  30. bool Bundle::operator!=(const Bundle& other) const
  31. {
  32. return (const PrimaryBlock&)(*this) != (const PrimaryBlock&)other;
  33. --- a/ibrdtn/data/Bundle.h
  34. +++ b/ibrdtn/data/Bundle.h
  35. @@ -97,7 +97,9 @@ namespace dtn
  36. virtual ~Bundle();
  37. bool operator==(const BundleID& other) const;
  38. + bool operator!=(const BundleID& other) const;
  39. bool operator==(const MetaBundle& other) const;
  40. + bool operator!=(const MetaBundle& other) const;
  41. bool operator==(const Bundle& other) const;
  42. bool operator!=(const Bundle& other) const;