From 4380b0e4a2d201e49fa80233b58a8bcdb6a86f50 Mon Sep 17 00:00:00 2001 From: Tom Poole Date: Thu, 8 Nov 2018 10:52:24 +0000 Subject: [PATCH] Fixed some VS2015 compiler errors --- .../littlefoot/juce_LittleFootCompiler.h | 8 ++++++++ .../topology/juce_PhysicalTopologySource.cpp | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/modules/juce_blocks_basics/littlefoot/juce_LittleFootCompiler.h b/modules/juce_blocks_basics/littlefoot/juce_LittleFootCompiler.h index 4fad19b98d..f2c03a939a 100644 --- a/modules/juce_blocks_basics/littlefoot/juce_LittleFootCompiler.h +++ b/modules/juce_blocks_basics/littlefoot/juce_LittleFootCompiler.h @@ -1324,6 +1324,14 @@ private: struct Variable { + // VS2015 requires a constructor to avoid aggregate initialization + Variable (const String& n, Type t, bool isGlobalVar, bool isConstVar, const var& cv, + int nElements = 0, Variable* pArray = nullptr, Variable* nArray = nullptr) + : name (n), type (t), isGlobal (isGlobalVar), isConst (isConstVar), constantValue (cv), + numElements (nElements), previousArray (pArray), nextArray (nArray) + { + } + String name; Type type; bool isGlobal, isConst; diff --git a/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.cpp b/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.cpp index cfc2434c75..8618725597 100644 --- a/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.cpp +++ b/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.cpp @@ -342,6 +342,13 @@ struct PhysicalTopologySource::Internal //============================================================================== struct DeviceInfo { + // VS2015 requires a constructor to avoid aggregate initialization + DeviceInfo (Block::UID buid, BlocksProtocol::TopologyIndex tidx, BlocksProtocol::BlockSerialNumber s, + BlocksProtocol::VersionNumber v, BlocksProtocol::BlockName n, bool master = false) + : uid (buid), index (tidx), serial (s), version (v), name (n), isMaster (master) + { + } + Block::UID uid {}; BlocksProtocol::TopologyIndex index; BlocksProtocol::BlockSerialNumber serial;