From 9ab07ecba698734e91f32d20570da3ba3c58d4c2 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 11 Aug 2024 22:55:37 -0400 Subject: [PATCH] don't return temporaries --- tools/lammps-gui/chartviewer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lammps-gui/chartviewer.h b/tools/lammps-gui/chartviewer.h index 2f458304a4..11a8980d5f 100644 --- a/tools/lammps-gui/chartviewer.h +++ b/tools/lammps-gui/chartviewer.h @@ -90,7 +90,7 @@ public: int get_index() const { return index; }; int get_count() const { return series->count(); } - const char *get_title() const { return series->name().toStdString().c_str(); } + QString get_title() const { return series->name(); } double get_step(int index) const { return (index < 0) ? 0.0 : series->at(index).x(); } double get_data(int index) const { return (index < 0) ? 0.0 : series->at(index).y(); }