From d30496c5bd47fbe95201cf5e71d8a9bbf745b62b Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Sat, 14 Jul 2018 21:58:56 -0500 Subject: [PATCH] Let's not return references to Slic3r::Config when we can return the shared pointer instead from methods that are going to construct a Slic3r::Config --- src/GUI/Preset.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GUI/Preset.hpp b/src/GUI/Preset.hpp index 7d3ece2a4..9df1fc8cd 100644 --- a/src/GUI/Preset.hpp +++ b/src/GUI/Preset.hpp @@ -56,8 +56,8 @@ public: /// Returns whether or not this config is different from its modified state. bool dirty(); - /// Loads the selected config from file and return a reference. - Slic3r::Config& load_config(); + /// Loads the selected config from file and return a shared_ptr to that config + config_ptr load_config(); /// Pass-through to Slic3r::Config, returns whether or not a config was loaded. bool loaded() { return !this->config.empty(); }