From 06de16434db22d56337f352679e7c01f696231c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Mon, 19 Aug 2024 13:10:35 +0200 Subject: [PATCH] messages: return fields by const ref --- ulog_cpp/messages.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ulog_cpp/messages.hpp b/ulog_cpp/messages.hpp index aa471e8..2f5769a 100644 --- a/ulog_cpp/messages.hpp +++ b/ulog_cpp/messages.hpp @@ -586,7 +586,7 @@ class MessageFormat { /** * @return the list of fields, in-order */ - std::vector> fields() const { return _fields_ordered; } + const std::vector>& fields() const { return _fields_ordered; } /** * @return the list of field names, in-order