diff --git a/lokimq/lokimq.cpp b/lokimq/lokimq.cpp index 84f2441..c4660d7 100644 --- a/lokimq/lokimq.cpp +++ b/lokimq/lokimq.cpp @@ -1,12 +1,10 @@ -#include +#include "lokimq.h" #include -#include #include extern "C" { #include } -#include "lokimq.h" #include "batch.h" #include "hex.h" @@ -44,14 +42,6 @@ zmq::message_t create_message(string_view data) { return zmq::message_t{data.begin(), data.end()}; } -/* -/// Create a message that references the existing data. In order to use this safely you need to be -/// sure that the referenced data lasts sufficiently long, which can be tricky. -zmq::message_t create_message_reference(string_view data) { - return zmq::message_t{const_cast(&data[0]), data.size(), (zmq::free_fn*) nullptr, nullptr}; -} -*/ - /// Creates a message by bt-serializing the given value (string, number, list, or dict) template zmq::message_t create_bt_message(T&& data) { return create_message(bt_serialize(std::forward(data))); } diff --git a/lokimq/lokimq.h b/lokimq/lokimq.h index bfb32e2..ed09e05 100644 --- a/lokimq/lokimq.h +++ b/lokimq/lokimq.h @@ -40,6 +40,7 @@ #include #include #include +#include #include #include "bt_serialize.h" #include "string_view.h"