Browse Source

Set default component ID to -1 in all classes.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
697571648d
8 changed files with 11 additions and 11 deletions
  1. +1
    -1
      include/app/ModuleLightWidget.hpp
  2. +1
    -1
      include/app/ParamWidget.hpp
  3. +2
    -2
      include/app/PortWidget.hpp
  4. +2
    -2
      include/engine/Cable.hpp
  5. +1
    -1
      include/engine/LightInfo.hpp
  6. +1
    -1
      include/engine/ParamQuantity.hpp
  7. +2
    -2
      include/engine/PortInfo.hpp
  8. +1
    -1
      src/engine/ParamQuantity.cpp

+ 1
- 1
include/app/ModuleLightWidget.hpp View File

@@ -14,7 +14,7 @@ Will access firstLightId, firstLightId + 1, etc. for each added color
*/
struct ModuleLightWidget : MultiLightWidget {
engine::Module* module = NULL;
int firstLightId;
int firstLightId = -1;

ui::Tooltip* tooltip = NULL;



+ 1
- 1
include/app/ParamWidget.hpp View File

@@ -13,7 +13,7 @@ namespace app {
/** Manages an engine::Param on a ModuleWidget. */
struct ParamWidget : widget::OpaqueWidget {
engine::Module* module = NULL;
int paramId;
int paramId = -1;

ui::Tooltip* tooltip = NULL;
/** For triggering the Change event. `*/


+ 2
- 2
include/app/PortWidget.hpp View File

@@ -14,8 +14,8 @@ namespace app {
/** Manages an engine::Port on a ModuleWidget. */
struct PortWidget : widget::OpaqueWidget {
engine::Module* module = NULL;
engine::Port::Type type;
int portId;
engine::Port::Type type = engine::Port::INPUT;
int portId = -1;

ui::Tooltip* tooltip = NULL;



+ 2
- 2
include/engine/Cable.hpp View File

@@ -14,9 +14,9 @@ struct Cable {
*/
int64_t id = -1;
Module* inputModule = NULL;
int inputId;
int inputId = -1;
Module* outputModule = NULL;
int outputId;
int outputId = -1;

json_t* toJson();
void fromJson(json_t* rootJ);


+ 1
- 1
include/engine/LightInfo.hpp View File

@@ -11,7 +11,7 @@ struct Module;

struct LightInfo {
Module* module = NULL;
int lightId;
int lightId = -1;

/** The name of the light, using sentence capitalization.
e.g. "Level", "Pitch light", "Mode CV".


+ 1
- 1
include/engine/ParamQuantity.hpp View File

@@ -17,7 +17,7 @@ struct Module;
/** A Quantity that wraps an engine::Param. */
struct ParamQuantity : Quantity {
Module* module = NULL;
int paramId;
int paramId = -1;

/** The minimum allowed value. */
float minValue = 0.f;


+ 2
- 2
include/engine/PortInfo.hpp View File

@@ -12,8 +12,8 @@ struct Module;

struct PortInfo {
Module* module = NULL;
Port::Type type;
int portId;
Port::Type type = Port::INPUT;
int portId = -1;

/** The name of the port, using sentence capitalization.
e.g. "Sine", "Pitch input", "Mode CV".


+ 1
- 1
src/engine/ParamQuantity.cpp View File

@@ -12,7 +12,7 @@ namespace engine {

engine::Param* ParamQuantity::getParam() {
assert(module);
assert(paramId < (int) module->params.size());
assert(0 <= paramId && paramId < (int) module->params.size());
return &module->params[paramId];
}



Loading…
Cancel
Save