diff --git a/debian/fill.copyright.blanks.yml b/debian/fill.copyright.blanks.yml index 570b35e..6cabc92 100644 --- a/debian/fill.copyright.blanks.yml +++ b/debian/fill.copyright.blanks.yml @@ -170,5 +170,12 @@ react/node_modules/workbox-build/node_modules/source-map/: copyright: 2009-2011, 2014, Mozilla Foundation and contributors license: BSD-2-clause +react/node_modules/atob/: + copyright: 2012-2018, AJ ONeal + license: Apache-2.0 or Expat + + + + diff --git a/src/PedalBoard.hpp b/src/PedalBoard.hpp index 7b8be7a..ddfee3d 100644 --- a/src/PedalBoard.hpp +++ b/src/PedalBoard.hpp @@ -74,7 +74,7 @@ public: }; class PedalBoardItem: public JsonWritable { - long instanceId_ = 0; + int64_t instanceId_ = 0; std::string uri_; std::string pluginName_; bool isEnabled_ = true; diff --git a/src/ShutdownMain.cpp b/src/ShutdownMain.cpp index 84e77a0..92962cd 100644 --- a/src/ShutdownMain.cpp +++ b/src/ShutdownMain.cpp @@ -293,7 +293,7 @@ private: void StartAccept() { // socket - std::shared_ptr reader = Reader::Create(acceptor_.get_io_service()); + std::shared_ptr reader = Reader::Create(acceptor_.get_executor().context()); // asynchronous accept operation and wait for a new connection. acceptor_.async_accept(reader->Socket(), diff --git a/src/json.hpp b/src/json.hpp index 30668a0..2611523 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -283,23 +283,27 @@ public: { this->CRLF = compressed? "" : "\r\n"; } + void write(long long value) + { + os << value; + } + void write(unsigned long long value) + { + os << value; + } void write(long value) { os << value; } - void write(int64_t value) + void write(unsigned long value) { os << value; } - void write(uint64_t value) + void write(int value) { os << value; } - void write(int32_t value) - { - os << value; - } - void write(uint32_t value) + void write(unsigned int value) { os << value; } @@ -356,7 +360,7 @@ public: { write(value[0]); } - for (int i = 1; i < value.size(); ++i) + for (size_t i = 1; i < value.size(); ++i) { os << ","; write(value[i]); @@ -367,7 +371,7 @@ public: os << "[" << CRLF; indent_level += TAB_SIZE; bool first = true; - for (int i = 0; i < value.size(); ++i) + for (size_t i = 0; i < value.size(); ++i) { if (!first) { @@ -682,27 +686,37 @@ public: skip_whitespace(); *value = read_boolean(); } + void read(int *value) { + skip_whitespace(); + is_ >> *value; + if (is_.fail()) throw PiPedalException("Invalid format."); + } void read(long*value) { is_ >> *value; if (is_.fail()) throw PiPedalException("Invalid format."); } - void read(int32_t *value) { + void read(long long*value) { skip_whitespace(); is_ >> *value; if (is_.fail()) throw PiPedalException("Invalid format."); } - void read(int64_t*value) { + void read(int *value) { skip_whitespace(); is_ >> *value; if (is_.fail()) throw PiPedalException("Invalid format."); } - void read(uint32_t *value) { - skip_whitespace(); + void read(unsigned int*value) + { is_ >> *value; if (is_.fail()) throw PiPedalException("Invalid format."); } - void read(uint64_t*value) { + void read(unsigned long*value) + { + is_ >> *value; + if (is_.fail()) throw PiPedalException("Invalid format."); + } + void read(unsigned long long*value) { skip_whitespace(); is_ >> *value; if (is_.fail()) throw PiPedalException("Invalid format.");