]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCommandParams.cpp
Make undo action no-ops when the buffer is read-only
[lyx.git] / src / insets / InsetCommandParams.cpp
index 727ab5d484d5943e8ff4ec352f56084512ea989c..09c9ee85a0926b279c396cec0040a97eecda13e2 100644 (file)
@@ -5,15 +5,12 @@
  *
  * \author Angus Leeming
  * \author Georg Baum
- * \author Richard Heck
+ * \author Richard Kimberly Heck
  *
  * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
-#include <algorithm>
-#include <functional>
-
 
 #include "InsetCommandParams.h"
 
@@ -34,7 +31,6 @@
 #include "Buffer.h"
 #include "Encoding.h"
 #include "Lexer.h"
-#include "OutputParams.h"
 
 #include "frontends/alert.h"
 
@@ -46,6 +42,9 @@
 
 #include "support/lassert.h"
 
+#include <algorithm>
+#include <functional>
+
 using namespace std;
 using namespace lyx::support;
 
@@ -501,8 +500,7 @@ docstring InsetCommandParams::prepareCommand(OutputParams const & runparams,
                // we can only output characters covered by the current
                // encoding!
                docstring uncodable;
-               for (size_type i = 0 ; i < command.size() ; ++i) {
-                       char_type c = command[i];
+               for (char_type c : command) {
                        try {
                                if (runparams.encoding->encodable(c))
                                        result += c;