Skip to content

Commit

Permalink
Revert unrelated changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Neverlord committed Sep 30, 2023
1 parent 490fc45 commit 3069ace
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions include/broker/internal/generator_file_writer.hh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@
#include <variant>
#include <vector>

#include <caf/binary_serializer.hpp>
#include <caf/byte.hpp>
#include <caf/fwd.hpp>

#include "broker/fwd.hh"

#include <vector>

namespace broker::internal {

class generator_file_writer {
Expand Down Expand Up @@ -75,7 +74,8 @@ public:
private:
caf::error topic_id(const topic& x, uint16_t& id);

std::vector<caf::byte> buf_;
caf::binary_serializer::container_type buf_;
caf::binary_serializer sink_;
std::ofstream f_;
size_t flush_threshold_;
std::vector<topic> topic_table_;
Expand Down
4 changes: 2 additions & 2 deletions src/internal/generator_file_writer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "broker/internal/meta_data_writer.hh"
#include "broker/internal/type_id.hh"
#include "broker/internal/write_value.hh"
#include "broker/logger.hh"
#include "broker/message.hh"

namespace broker::internal {
Expand All @@ -26,7 +25,8 @@ auto generator_file_writer::format::header()
return result;
}

generator_file_writer::generator_file_writer() : flush_threshold_(1024) {
generator_file_writer::generator_file_writer()
: sink_(nullptr, buf_), flush_threshold_(1024) {
buf_.reserve(2028);
}

Expand Down
4 changes: 3 additions & 1 deletion src/internal/metric_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ namespace broker::internal {
metric_view::metric_view(const vector* row)
: type_(static_cast<caf::telemetry::metric_type>(0)) {
using std::string;
auto at = [row](field x) -> const auto& { return (*row)[index(x)]; };
auto at = [row](field x) -> const auto& {
return (*row)[index(x)];
};
auto row_ok = row != nullptr && row->size() == row_size
&& is<string>(at(field::prefix)) && is<string>(at(field::name))
&& is<string>(at(field::type)) && is<string>(at(field::unit))
Expand Down

0 comments on commit 3069ace

Please sign in to comment.