summaryrefslogtreecommitdiffstats
path: root/libtransport/src
diff options
context:
space:
mode:
Diffstat (limited to 'libtransport/src')
-rw-r--r--libtransport/src/core/interest.cc16
-rw-r--r--libtransport/src/core/local_connector.h1
-rw-r--r--libtransport/src/core/portal.h2
3 files changed, 8 insertions, 11 deletions
diff --git a/libtransport/src/core/interest.cc b/libtransport/src/core/interest.cc
index 10e1a6dfa..6348a8d3e 100644
--- a/libtransport/src/core/interest.cc
+++ b/libtransport/src/core/interest.cc
@@ -76,14 +76,13 @@ Interest &Interest::operator=(const Interest &other) {
return (Interest &)Packet::operator=(other);
}
-Interest::~Interest() {}
+Interest::~Interest() = default;
const Name &Interest::getName() const {
- if (!name_) {
- if (hicn_interest_get_name(
- &pkbuf_, (hicn_name_t *)&name_.getConstStructReference()) < 0) {
- throw errors::MalformedPacketException();
- }
+ if (!name_ &&
+ hicn_interest_get_name(
+ &pkbuf_, (hicn_name_t *)&name_.getConstStructReference()) < 0) {
+ throw errors::MalformedPacketException();
}
return name_;
@@ -149,7 +148,7 @@ void Interest::resetForHash() {
}
}
-bool Interest::hasManifest() {
+bool Interest::hasManifest() const {
return (getPayloadType() == PayloadType::MANIFEST);
}
@@ -174,8 +173,7 @@ void Interest::encodeSuffixes() {
memset(int_manifest_header->request_bitmap, 0xFFFFFFFF,
BITMAP_SIZE * sizeof(hicn_uword));
- uint32_t *suffix = (uint32_t *)(int_manifest_header + 1);
- for (auto it = suffix_set_.begin(); it != suffix_set_.end(); it++, suffix++) {
+ for (auto it = suffix_set_.begin(); it != suffix_set_.end(); it++) {
interest_manifest_add_suffix(int_manifest_header, *it);
}
diff --git a/libtransport/src/core/local_connector.h b/libtransport/src/core/local_connector.h
index 963f455e6..bf64b71d6 100644
--- a/libtransport/src/core/local_connector.h
+++ b/libtransport/src/core/local_connector.h
@@ -20,7 +20,6 @@
#include <hicn/transport/core/connector.h>
#include <hicn/transport/core/global_object_pool.h>
#include <hicn/transport/errors/not_implemented_exception.h>
-#include <hicn/transport/utils/move_wrapper.h>
#include <hicn/transport/utils/shared_ptr_utils.h>
#include <io_modules/forwarder/errors.h>
diff --git a/libtransport/src/core/portal.h b/libtransport/src/core/portal.h
index 7a6ab9d0e..c4ba096b9 100644
--- a/libtransport/src/core/portal.h
+++ b/libtransport/src/core/portal.h
@@ -56,7 +56,7 @@ class HandlerMemory {
HandlerMemory(const HandlerMemory &) = delete;
HandlerMemory &operator=(const HandlerMemory &) = delete;
- void *allocate(std::size_t size) {
+ void *allocate(std::size_t /* size */) {
return utils::FixedBlockAllocator<128, 8192>::getInstance().allocateBlock();
}