@@ -1502,6 +1502,10 @@ void WaveformArea::RenderSpectrumPeaks(ImDrawList* list, shared_ptr<DisplayedCha
15021502 else
15031503 npeak.m_labelYpos = p.m_y - PixelsToYAxisUnits (3 *ImGui::GetFontSize ());
15041504
1505+ // Default sizes to 0 until we render it, just so we don't have uninitialized junk floating around
1506+ npeak.m_labelXsize = 0 ;
1507+ npeak.m_labelYsize = 0 ;
1508+
15051509 // Default to 100% alpha
15061510 npeak.m_peakAlpha = 255 ;
15071511
@@ -3078,13 +3082,11 @@ void WaveformArea::CheckForScaleMismatch(ImVec2 start, ImVec2 size)
30783082 // If the mismatched stream isn't part of a scope, don't bother showing any warnings etc
30793083 // Filters can't be overdriven, so just silently clip
30803084 auto ochan = dynamic_cast <OscilloscopeChannel*>(mismatchStream.m_channel );
3081- Oscilloscope* scope = nullptr ;
3082- if (ochan)
3083- {
3084- scope = ochan->GetScope ();
3085- if (!scope)
3086- return ;
3087- }
3085+ if (!ochan)
3086+ return ;
3087+ auto scope = ochan->GetScope ();
3088+ if (!scope)
3089+ return ;
30883090
30893091 // If we get here, we had a mismatch. Prepare to draw the warning message centered in the plot
30903092 // above everything else
@@ -4138,7 +4140,7 @@ void WaveformArea::ChannelButton(shared_ptr<DisplayedChannel> chan, size_t index
41384140 ImVec2 gradsize (8 *height, height);
41394141
41404142 auto list = ImGui::GetWindowDrawList ();
4141- for (auto internalName : gradients)
4143+ for (auto & internalName : gradients)
41424144 {
41434145 auto displayName = m_parent->GetEyeGradientFriendlyName (internalName);
41444146
0 commit comments