diff --git a/src/cpp/benders/outer_loop/OuterLoopInputDataReader.cpp b/src/cpp/benders/outer_loop/OuterLoopInputDataReader.cpp index 889301284..94a01074a 100644 --- a/src/cpp/benders/outer_loop/OuterLoopInputDataReader.cpp +++ b/src/cpp/benders/outer_loop/OuterLoopInputDataReader.cpp @@ -53,7 +53,7 @@ void OuterLoopInputData::AddSingleData(const OuterLoopSingleInputData &data) { outer_loop_data_.push_back(data); } -std::vector OuterLoopInputData::OuterLoopData() +const std::vector &OuterLoopInputData::OuterLoopData() const { return outer_loop_data_; } diff --git a/src/cpp/benders/outer_loop/include/OuterLoopInputDataReader.h b/src/cpp/benders/outer_loop/include/OuterLoopInputDataReader.h index 0c40875d7..ef31a46b6 100644 --- a/src/cpp/benders/outer_loop/include/OuterLoopInputDataReader.h +++ b/src/cpp/benders/outer_loop/include/OuterLoopInputDataReader.h @@ -80,7 +80,8 @@ class OuterLoopInputData { public: OuterLoopInputData() = default; - [[nodiscard]] std::vector OuterLoopData() const; + [[nodiscard]] const std::vector &OuterLoopData() + const; [[nodiscard]] std::vector PatternBodies() const; [[nodiscard]] std::string PatternsPrefix() const;