From ffc1976b972accc6ce48f6befaa7254a7f353156 Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Sat, 5 Mar 2022 03:46:22 +0100 Subject: [PATCH] Avoid copies of vectors. --- src/Encoding.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Encoding.h b/src/Encoding.h index 6016f05f02..9668336843 100644 --- a/src/Encoding.h +++ b/src/Encoding.h @@ -79,11 +79,11 @@ public: /// LaTeX command (text mode) for this character docstring textCommand() const { return text_commands_[0]; } /// All known LaTeX commands (text mode) for this character - std::vector textCommands() const { return text_commands_; } + const std::vector& textCommands() const { return text_commands_; } /// LaTeX command (math mode) for this character docstring mathCommand() const { return math_commands_[0]; } /// All known LaTeX commands (math mode) for this character - std::vector mathCommands() const { return math_commands_; } + const std::vector& mathCommands() const { return math_commands_; } /// Needed LaTeX preamble (or feature) for text mode std::string textPreamble() const { return text_preamble_; } /// Needed LaTeX preamble (or feature) for math mode -- 2.39.5