Skip to content

Commit

Permalink
Remove some references to nlohmann json
Browse files Browse the repository at this point in the history
  • Loading branch information
mls-m5 committed Jul 25, 2024
1 parent 5416874 commit a4cdc88
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 18 deletions.
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ target_link_libraries(
PUBLIC
medit_common
medit_core
nlohmann_json::nlohmann_json
# nlohmann_json::nlohmann_json
PRIVATE
)

Expand Down
1 change: 0 additions & 1 deletion src/pch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

/// This file is used as a precompiled header

#include "nlohmann/json.hpp"
#include <filesystem>
#include <functional>
#include <iostream>
Expand Down
7 changes: 0 additions & 7 deletions src/screen/deserializescreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,6 @@ void DeserializeScreen::handle(std::string_view str) {
oarch.set("value", _screen->clipboardData());
}
send(oss.str());

// send(nlohmann::json{
// {"id", id},
// {"value", _screen->clipboardData()},
// });
return;
}
}
Expand Down Expand Up @@ -149,6 +144,4 @@ void DeserializeScreen::screenCallback(IScreen::EventListT list) {
oarch("events", list);
}
send(ss.str());

// send(nlohmann::json{{"events", list}});
}
4 changes: 0 additions & 4 deletions src/screen/serializescreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,15 @@ class SerializeScreen : public IScreen {
volatile std::atomic_long _currentRequest = 1;
volatile std::atomic_long _receivedRequest = 0;

// void send(const nlohmann::json &);
void send(std::string_view str);
std::string request(std::string_view method);

//! Where the remote data enters this class
// void receive(const nlohmann::json &);
// void receive(Archive &);
void receive(std::string_view data);

std::mutex _mutex;
std::condition_variable _cv;

// nlohmann::json _receivedData;
std::string _receivedData;

CallbackT _callback;
Expand Down
2 changes: 0 additions & 2 deletions src/syntax/color.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,4 @@ class Color {
}
return 0;
}

// NLOHMANN_DEFINE_TYPE_INTRUSIVE(Color, _r, _g, _b)
};
3 changes: 0 additions & 3 deletions src/syntax/palette.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@ class Palette /*: public IPalette*/ {
};

void visit(Archive &arch);

// TODO: Deprecated, remove this
// NLOHMANN_DEFINE_TYPE_INTRUSIVE(Palette, _palette, _styles)
};

void visit(Archive &arch, std::map<std::string, Color> &);
Expand Down

0 comments on commit a4cdc88

Please sign in to comment.