diff --git a/README.md b/README.md index ea83c89..ee847c5 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,15 @@ ### How to Build and Run +**CMake Presets** + +```bash +$> cmake --preset dev +# OR +$> cmake --preset release +$> cmake --build build -t run_with_tb +``` + **Another C++ toolchain** ```bash diff --git a/include/tb_client.hpp b/include/tb_client.hpp index 4dd657a..29c12aa 100644 --- a/include/tb_client.hpp +++ b/include/tb_client.hpp @@ -90,7 +90,8 @@ inline void default_on_completion([[maybe_unused]] uintptr_t context, class Client { public: - explicit Client(const std::string &address, uint32_t cluster_id = 0, + explicit Client(const std::string &address, + std::array cluster_id = {}, uintptr_t on_completion_ctx = 0, void (*on_completion_fn)(uintptr_t, tb_client_t, tb_packet_t *, uint64_t, @@ -98,8 +99,8 @@ class Client { uint32_t) = &default_on_completion) : client(nullptr) { status = - tb_client_init(&client, cluster_id, address.c_str(), address.length(), - on_completion_ctx, on_completion_fn); + tb_client_init(&client, cluster_id.data(), address.c_str(), + address.length(), on_completion_ctx, on_completion_fn); } Client(const Client &) = delete;