Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Unified Diff: webrtc/tools/event_log_visualizer/plot_base.h

Issue 2824973003: Event log visualizer TimeSeries is now created on the stack and then moved into the vector of serie… (Closed)
Patch Set: Feedback Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/tools/event_log_visualizer/analyzer.cc ('k') | webrtc/tools/event_log_visualizer/plot_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/tools/event_log_visualizer/plot_base.h
diff --git a/webrtc/tools/event_log_visualizer/plot_base.h b/webrtc/tools/event_log_visualizer/plot_base.h
index b2ab299a58ba73fa1f6181a4ff55efad4be82bc7..afa20beaf8c82f78b5d7b97d6312a09ede95edb5 100644
--- a/webrtc/tools/event_log_visualizer/plot_base.h
+++ b/webrtc/tools/event_log_visualizer/plot_base.h
@@ -34,10 +34,9 @@ struct TimeSeriesPoint {
struct TimeSeries {
TimeSeries() = default;
- TimeSeries(const char* label, PlotStyle style)
- : label(label), style(style), points() {}
+ TimeSeries(const char* label, PlotStyle style) : label(label), style(style) {}
TimeSeries(const std::string& label, PlotStyle style)
- : label(label), style(style), points() {}
+ : label(label), style(style) {}
TimeSeries(TimeSeries&& other)
: label(std::move(other.label)),
style(other.style),
@@ -108,10 +107,7 @@ class Plot {
void SetTitle(std::string title);
// Add a new TimeSeries to the plot.
- TimeSeries* AddTimeSeries(const char* label, PlotStyle style);
- TimeSeries* AddTimeSeries(const std::string& label, PlotStyle style);
-
- std::vector<TimeSeries> series_list_;
+ void AppendTimeSeries(TimeSeries&& time_series);
protected:
float xaxis_min_;
@@ -121,6 +117,7 @@ class Plot {
float yaxis_max_;
std::string yaxis_label_;
std::string title_;
+ std::vector<TimeSeries> series_list_;
};
class PlotCollection {
« no previous file with comments | « webrtc/tools/event_log_visualizer/analyzer.cc ('k') | webrtc/tools/event_log_visualizer/plot_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698