From 75aa0d61dba848cda39ceddcde9c2f3f0b9afbe8 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sun, 6 Apr 2014 21:53:54 -0400 Subject: [PATCH] Make some functions return const refs, and add a comment. --- src/insets/InsetLayout.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/insets/InsetLayout.h b/src/insets/InsetLayout.h index 74e1af9db6..83bbb2d0de 100644 --- a/src/insets/InsetLayout.h +++ b/src/insets/InsetLayout.h @@ -85,13 +85,18 @@ public: FontInfo labelfont() const { return labelfont_; } /// ColorCode bgcolor() const { return bgcolor_; } + /// + Layout::LaTeXArgMap const & latexargs() const { return latexargs_; } /// + Layout::LaTeXArgMap const & postcommandargs() const { return postcommandargs_; } + /// Returns latexargs() + postcommandargs(). + /// But note that it returns a *copy*, not a reference, so do not do + /// anything like: + /// Layout::LaTeXArgMap it = args().begin(); + /// Layout::LaTeXArgMap en = args().end(); + /// Those are iterators for different containers. Layout::LaTeXArgMap args() const; /// - Layout::LaTeXArgMap latexargs() const { return latexargs_; } - /// - Layout::LaTeXArgMap postcommandargs() const { return postcommandargs_; } - /// unsigned int optArgs() const; /// unsigned int requiredArgs() const;