Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions include/zenoh/api/base.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@

#pragma once

#include <cstddef>
#include <cstdint>
#include <stdexcept>
#include <string>
#include <utility>

#include "../detail/availability_checks.hxx"
#include "../zenohc.hxx"
Expand Down
9 changes: 4 additions & 5 deletions include/zenoh/api/bytes.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,17 @@
#pragma once

#include "../detail/closures.hxx"
#include "../detail/commons.hxx"
#include "base.hxx"
#include "closures.hxx"
#include "interop.hxx"
#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API))
#include "shm/buffer/buffer.hxx"
#endif

#include <memory>
#include <optional>
#include <string>
#include <string_view>
#include <type_traits>
#include <utility>
#include <vector>

namespace zenoh {
Expand Down Expand Up @@ -81,10 +80,10 @@ class Bytes : public Owned<::z_owned_bytes_t> {
}

/// @brief Construct by copying sequence of charactes.
Bytes(const char* v) : Bytes(std::string_view(v)){};
Bytes(const char* v) : Bytes(std::string_view(v)) {};

/// @brief Construct by copying sequence of charactes.
Bytes(const std::string& v) : Bytes(std::string_view(v)){};
Bytes(const std::string& v) : Bytes(std::string_view(v)) {};

/// @brief Construct by moving a string.
Bytes(std::string&& v) : Bytes() {
Expand Down
8 changes: 5 additions & 3 deletions include/zenoh/api/channels.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
//

#pragma once

#include <utility>
#include <variant>

#include "base.hxx"
Expand Down Expand Up @@ -111,7 +113,7 @@ class FifoChannel;
/// @tparam T data entry type.
template <class T>
class FifoHandler : public Owned<typename detail::FifoHandlerData<T>::handler_type> {
FifoHandler(zenoh::detail::null_object_t) : Owned<typename detail::FifoHandlerData<T>::handler_type>(nullptr){};
FifoHandler(zenoh::detail::null_object_t) : Owned<typename detail::FifoHandlerData<T>::handler_type>(nullptr) {};

public:
/// @name Methods
Expand Down Expand Up @@ -152,7 +154,7 @@ class RingChannel;
/// @tparam T data entry type.
template <class T>
class RingHandler : public Owned<typename detail::RingHandlerData<T>::handler_type> {
RingHandler(zenoh::detail::null_object_t) : Owned<typename detail::RingHandlerData<T>::handler_type>(nullptr){};
RingHandler(zenoh::detail::null_object_t) : Owned<typename detail::RingHandlerData<T>::handler_type>(nullptr) {};

public:
/// @name Methods
Expand Down Expand Up @@ -242,4 +244,4 @@ class RingChannel {
}
};

} // namespace zenoh::channels
} // namespace zenoh::channels
4 changes: 2 additions & 2 deletions include/zenoh/api/config.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
#pragma once

#include <string>
#include <vector>
#include <string_view>

#include "base.hxx"
#include "interop.hxx"

namespace zenoh {
/// A Zenoh Session config.
class Config : public Owned<::z_owned_config_t> {
Config(zenoh::detail::null_object_t) : Owned(nullptr){};
Config(zenoh::detail::null_object_t) : Owned(nullptr) {};

public:
/// @name Constructors
Expand Down
4 changes: 3 additions & 1 deletion include/zenoh/api/encoding.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
// ZettaScale Zenoh Team, <[email protected]>

#pragma once

#include <string>
#include <string_view>

#include "../zenohc.hxx"
#include "base.hxx"
Expand Down Expand Up @@ -360,4 +362,4 @@ class Encoding : public Owned<::z_owned_encoding_t> {
};
#endif
};
} // namespace zenoh
} // namespace zenoh
3 changes: 2 additions & 1 deletion include/zenoh/api/enums.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// ZettaScale Zenoh Team, <[email protected]>

#pragma once

#include <string_view>

#include "../zenohc.hxx"
Expand Down Expand Up @@ -127,4 +128,4 @@ typedef ::z_locality_t Locality;
typedef ::zc_reply_keyexpr_t ReplyKeyExpr;
#endif

} // namespace zenoh
} // namespace zenoh
3 changes: 1 addition & 2 deletions include/zenoh/api/id.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#pragma once

#include <array>
#include <iomanip>
#include <iostream>
#include <string_view>

Expand Down Expand Up @@ -62,4 +61,4 @@ inline std::ostream& operator<<(std::ostream& os, const Id& id) {
::z_drop(::z_move(s));
return os;
}
} // namespace zenoh
} // namespace zenoh
10 changes: 6 additions & 4 deletions include/zenoh/api/keyexpr.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// ZettaScale Zenoh Team, <[email protected]>

#pragma once

#include <string>
#include <string_view>

#include "../zenohc.hxx"
Expand All @@ -27,7 +29,7 @@ namespace zenoh {
/// when transporting key expressions.

class KeyExpr : public Owned<::z_owned_keyexpr_t> {
KeyExpr(zenoh::detail::null_object_t) : Owned(nullptr){};
KeyExpr(zenoh::detail::null_object_t) : Owned(nullptr) {};
friend struct interop::detail::Converter;

public:
Expand Down Expand Up @@ -57,7 +59,7 @@ class KeyExpr : public Owned<::z_owned_keyexpr_t> {
/// @param err if not null, the result code will be written to this location, otherwise ZException exception will be
/// thrown in case of error.
KeyExpr(const std::string& key_expr, bool autocanonize = true, ZResult* err = nullptr)
: KeyExpr(static_cast<std::string_view>(key_expr), autocanonize, err){};
: KeyExpr(static_cast<std::string_view>(key_expr), autocanonize, err) {};

/// @brief Create a new instance from a null-terminated string.
///
Expand All @@ -66,7 +68,7 @@ class KeyExpr : public Owned<::z_owned_keyexpr_t> {
/// @param err if not null, the result code will be written to this location, otherwise ZException exception will be
/// thrown in case of error.
KeyExpr(const char* key_expr, bool autocanonize = true, ZResult* err = nullptr)
: KeyExpr(std::string_view(key_expr), autocanonize, err){};
: KeyExpr(std::string_view(key_expr), autocanonize, err) {};

/// @brief Copy constructor.
KeyExpr(const KeyExpr& other) : KeyExpr(zenoh::detail::null_object) {
Expand Down Expand Up @@ -208,4 +210,4 @@ class KeyExpr : public Owned<::z_owned_keyexpr_t> {
KeyExpr& operator=(KeyExpr&& other) = default;
};

} // namespace zenoh
} // namespace zenoh
5 changes: 4 additions & 1 deletion include/zenoh/api/logging.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
// ZettaScale Zenoh Team, <[email protected]>

#pragma once

#include <string>

#include "../zenohc.hxx"

namespace zenoh {
Expand All @@ -37,4 +40,4 @@ inline void init_log_from_env_or(const std::string& fallback_filter) {
}
#endif

} // namespace zenoh
} // namespace zenoh
2 changes: 2 additions & 0 deletions include/zenoh/api/querier.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
#include "../detail/closures_concrete.hxx"
#include "base.hxx"
#include "bytes.hxx"
#if defined(Z_FEATURE_UNSTABLE_API)
#include "cancellation.hxx"
#endif
#include "encoding.hxx"
#include "enums.hxx"
#include "interop.hxx"
Expand Down
2 changes: 2 additions & 0 deletions include/zenoh/api/session.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
#include "shm/client_storage/client_storage.hxx"
#include "shm/provider/shm_provider.hxx"
#endif
#if defined(Z_FEATURE_UNSTABLE_API)
#include "cancellation.hxx"
#endif

namespace zenoh {
namespace ext {
Expand Down
1 change: 0 additions & 1 deletion include/zenoh/detail/availability_checks.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// ZettaScale Zenoh Team, <[email protected]>
#pragma once

#include <optional>
#include <type_traits>

#include "../zenohc.hxx"
Expand Down
4 changes: 2 additions & 2 deletions include/zenoh/detail/closures.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace zenoh::detail::closures {

struct IDroppable {
virtual void drop() = 0;
virtual ~IDroppable(){};
virtual ~IDroppable() {};

static void delete_from_context(void* context) {
reinterpret_cast<IDroppable*>(context)->drop();
Expand Down Expand Up @@ -80,4 +80,4 @@ class Closure : public IClosure<R, Args...> {
}
};

} // namespace zenoh::detail::closures
} // namespace zenoh::detail::closures
4 changes: 3 additions & 1 deletion include/zenoh/detail/commons.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// ZettaScale Zenoh Team, <[email protected]>

#include <iterator>
#include <type_traits>
#include <utility>

namespace zenoh::detail::commons {

Expand Down Expand Up @@ -63,4 +65,4 @@ struct overloaded : Ts... {
template <class... Ts>
overloaded(Ts...) -> overloaded<Ts...>;

} // namespace zenoh::detail::commons
} // namespace zenoh::detail::commons
Loading