Skip to content

Commit

Permalink
Merge branch 'master' into development/jsonparser
Browse files Browse the repository at this point in the history
  • Loading branch information
msieben authored Jun 10, 2024
2 parents 7df8c43 + eb25181 commit 2b5a7a6
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Test Thunder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

jobs:
Thunder:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

strategy:
matrix:
Expand Down
5 changes: 2 additions & 3 deletions Source/Thunder/PluginServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -2923,13 +2923,12 @@ namespace PluginHost {

if ((original.IsValid() == true) && (_services.find(newCallsign) == _services.end())) {
// Copy original configuration
Plugin::Config newConfiguration;
newConfiguration.FromString(original->ConfigLine());
Plugin::Config newConfiguration(original->Configuration());
newConfiguration.Callsign = newCallsign;

Core::ProxyType<Service> clone = Core::ProxyType<Service>::Create(Configuration(), newConfiguration, *this, Service::mode::CLONED, _engine);

if (newService.IsValid() == true) {
if (clone.IsValid() == true) {
// Fire up the interface. Let it handle the messages.
_services.emplace(
std::piecewise_construct,
Expand Down
55 changes: 55 additions & 0 deletions Source/core/JSON.h
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,15 @@ namespace Core {
return (*this);
}

NumberType<TYPE, SIGNED, BASETYPE>& operator=(const Core::OptionalType<TYPE>& RHS)
{
if (RHS.IsSet() == true) {
operator=(RHS.Value());
}

return (*this);
}

inline TYPE Default() const
{
return _default;
Expand Down Expand Up @@ -1054,6 +1063,15 @@ namespace Core {
return (*this);
}

FloatType<TYPE>& operator=(const Core::OptionalType<TYPE>& RHS)
{
if (RHS.IsSet() == true) {
operator=(RHS.Value());
}

return (*this);
}

inline TYPE Default() const
{
return _default;
Expand Down Expand Up @@ -1347,6 +1365,15 @@ namespace Core {
return (*this);
}

Boolean& operator=(const Core::OptionalType<bool>& RHS)
{
if (RHS.IsSet() == true) {
operator=(RHS.Value());
}

return (*this);
}

inline bool Value() const
{
return ((_value & SetBit) != 0 ? (_value & ValueBit) != 0 : (_value & DefaultBit) != 0);
Expand Down Expand Up @@ -1582,6 +1609,15 @@ namespace Core {
return (*this);
}

String& operator=(const Core::OptionalType<string>& RHS)
{
if (RHS.IsSet() == true) {
operator=(RHS.Value());
}

return (*this);
}

String& operator=(const char RHS[])
{
Core::ToString(RHS, _value);
Expand Down Expand Up @@ -2630,6 +2666,15 @@ namespace Core {
return (*this);
}

EnumType<ENUMERATE>& operator=(const Core::OptionalType<ENUMERATE>& RHS)
{
if (RHS.IsSet() == true) {
operator=(RHS.Value());
}

return (*this);
}

inline const ENUMERATE Default() const
{
return (_default);
Expand Down Expand Up @@ -3243,6 +3288,16 @@ namespace Core {
return (*this);
}

template<typename ENUM>
ArrayType<ELEMENT>& operator=(const Core::OptionalType<ENUM>& RHS)
{
if (RHS.IsSet() == true) {
operator=(RHS.Value());
}

return (*this);
}

template<typename ENUM, typename std::enable_if<std::is_same<ELEMENT, EnumType<ENUM>>::value, int>::type = 0>
inline operator const ENUM() const
{
Expand Down
4 changes: 3 additions & 1 deletion Source/websocket/WebSocketLink.h
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,9 @@ POP_WARNING()
result += static_cast<uint16_t>(headerSize + payloadSizeInControlFrame); // actualDataSize

} else {
_parent.ReceiveData(&(dataFrame[result + headerSize]), actualDataSize);
if (actualDataSize != 0) {
_parent.ReceiveData(&(dataFrame[result + headerSize]), actualDataSize);
}

result += (headerSize + actualDataSize);
}
Expand Down

0 comments on commit 2b5a7a6

Please sign in to comment.