Skip to content

Commit 6ad10b0

Browse files
committed
fix: add missing default constructors (epezent#645)
The default constructors for ImPlotPointError, ImPlotTag, and ImPlotTick were missing.
1 parent 2992339 commit 6ad10b0

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

implot_internal.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ struct ImPlotColormapData {
421421
// ImPlotPoint with positive/negative error values
422422
struct ImPlotPointError {
423423
double X, Y, Neg, Pos;
424+
ImPlotPointError() { X = 0; Y = 0; Neg = 0; Pos = 0; }
424425
ImPlotPointError(double x, double y, double neg, double pos) {
425426
X = x; Y = y; Neg = neg; Pos = pos;
426427
}
@@ -487,6 +488,14 @@ struct ImPlotTag {
487488
ImU32 ColorBg;
488489
ImU32 ColorFg;
489490
int TextOffset;
491+
492+
ImPlotTag() {
493+
Axis = 0;
494+
Value = 0;
495+
ColorBg = 0;
496+
ColorFg = 0;
497+
TextOffset = 0;
498+
}
490499
};
491500

492501
struct ImPlotTagCollection {
@@ -541,6 +550,17 @@ struct ImPlotTick
541550
int Level;
542551
int Idx;
543552

553+
ImPlotTick() {
554+
PlotPos = 0;
555+
PixelPos = 0;
556+
LabelSize = ImVec2(0,0);
557+
TextOffset = -1;
558+
Major = false;
559+
ShowLabel = false;
560+
Level = 0;
561+
Idx = -1;
562+
}
563+
544564
ImPlotTick(double value, bool major, int level, bool show_label) {
545565
PixelPos = 0;
546566
PlotPos = value;

0 commit comments

Comments
 (0)