Skip to content

Commit

Permalink
Adds a forward declaration for DataParamEntry to avoid circular depen…
Browse files Browse the repository at this point in the history
…dencies
  • Loading branch information
kenorb committed Apr 20, 2021
1 parent bb8e5f2 commit 0792363
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Chart.define.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@
#define MODE_MARGINHEDGED 31
#define MODE_MARGINREQUIRED 32
#define MODE_FREEZELEVEL 33
#endif
#endif
2 changes: 1 addition & 1 deletion Chart.struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -424,4 +424,4 @@ struct ChartPriceOpen {
static double Get(const string _symbol, const ENUM_TIMEFRAMES _tf, const int _shift) {
return ChartHistory::iOpen(_symbol, _tf, _shift);
}
};
};
2 changes: 1 addition & 1 deletion Chart.struct.tf.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,4 @@ SerializerNodeType ChartTf::Serialize(Serializer& s) {
s.PassEnum(this, "tf", tf);
s.PassEnum(this, "tfi", tfi);
return SerializerNodeObject;
}
}
2 changes: 1 addition & 1 deletion Data.define.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
#define LONG_VALUE INT_VALUE
//---
#define EMPTY -1
#endif
#endif
2 changes: 1 addition & 1 deletion Order.define.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@
#define OP_SELLSTOP ORDER_TYPE_SELL_STOP // Pending order of SELL STOP type
#define OP_BALANCE 6
// --
#endif
#endif
2 changes: 1 addition & 1 deletion SymbolInfo.define.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
// --
#define Point _Point
#define Digits _Digits
#endif
#endif
3 changes: 3 additions & 0 deletions tests/ActionTest.mq5
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
// Defines.
#define ACTION_EA_ENABLED

// Forward declaration.
struct DataParamEntry;

// Includes.
#include "../Action.mqh"
#include "../DictObject.mqh"
Expand Down
3 changes: 3 additions & 0 deletions tests/ConditionTest.mq5
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
* Test functionality of Condition class.
*/

// Forward declaration.
struct DataParamEntry;

// Includes.
#include "../Condition.mqh"
#include "../DictObject.mqh"
Expand Down
10 changes: 5 additions & 5 deletions tests/ConvertTest.mq5
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ int OnInit() {
assertTrueOrFail(Convert::PointsToValue(10, 0, 5) == 0.00010, "Invalid conversion of points to value");

// Test GetPipDiff().
assertTrueOrFail(Convert::GetValueDiffInPips(0.00010, 0.00020, True, 4) == 1, "Invalid result of diff value");
assertTrueOrFail(Convert::GetValueDiffInPips(0.00020, 0.00010, False, 4) == 1, "Invalid result of diff value");
assertTrueOrFail(Convert::GetValueDiffInPips(0.00020, 0.00010, False, 5) == 1, "Invalid result of diff value");
assertTrueOrFail(Convert::GetValueDiffInPips(0.00400, 0.00200, False, 4) == 20, "Invalid result of diff value");
assertTrueOrFail(Convert::GetValueDiffInPips(0.00400, 0.00200, False, 5) == 20, "Invalid result of diff value");
assertTrueOrFail(Convert::GetValueDiffInPips(0.00010, 0.00020, true, 4) == 1, "Invalid result of diff value");
assertTrueOrFail(Convert::GetValueDiffInPips(0.00020, 0.00010, false, 4) == 1, "Invalid result of diff value");
assertTrueOrFail(Convert::GetValueDiffInPips(0.00020, 0.00010, false, 5) == 1, "Invalid result of diff value");
assertTrueOrFail(Convert::GetValueDiffInPips(0.00400, 0.00200, false, 4) == 20, "Invalid result of diff value");
assertTrueOrFail(Convert::GetValueDiffInPips(0.00400, 0.00200, false, 5) == 20, "Invalid result of diff value");

// Test ValueWithCurrency().
// Print("Euro sign: " + ShortToString(0x20A0));
Expand Down
3 changes: 3 additions & 0 deletions tests/EATest.mq5
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
* Test functionality of EA class.
*/

// Forward declaration.
struct DataParamEntry;

// Includes.
#include "../EA.mqh"
#include "../Test.mqh"
Expand Down
3 changes: 3 additions & 0 deletions tests/IndicatorsTest.mq5
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
// Defines.
//#define __debug__ // Enables debug.

// Forward declaration.
struct DataParamEntry;

// Includes.
#include "../Dict.mqh"
#include "../DictObject.mqh"
Expand Down
3 changes: 3 additions & 0 deletions tests/TradeTest.mq5
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
* Test functionality of Trade class.
*/

// Forward declaration.
struct DataParamEntry;

// Includes.
#include "../Test.mqh"
#include "../Trade.mqh"
Expand Down

0 comments on commit 0792363

Please sign in to comment.