]> git.lyx.org Git - lyx.git/blobdiff - src/errorlist.h
don't pass temporary string objects as parameters
[lyx.git] / src / errorlist.h
index f2a9b2d46787ac1bd603bb07cf58884884dc92b1..8c91c42e32a3a3018ce1c6c15506e45b441bf210 100644 (file)
@@ -1,8 +1,4 @@
 // -*- C++ -*-
-
-#ifndef ERRORLIST_H
-#define ERRORLIST_H
-
 /**
  * \file errorlist.h
  * This file is part of LyX, the document processor.
  *
  * \author Alfredo Braunstein
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
-#include "LString.h"
+#ifndef ERRORLIST_H
+#define ERRORLIST_H
+
+#include "support/docstring.h"
 
 #include <vector>
+#include <string>
+
+
+namespace lyx {
 
 class Buffer;
 
 /// A class to hold an error item
-struct ErrorItem {
-       string error;
-       string description;
+class ErrorItem {
+public:
+       docstring error;
+       docstring description;
        int par_id;
-       int pos_start;
-       int pos_end;
-       ErrorItem(string const & error, string const & description, 
-                 int parid, int posstart, int posend);
+       pos_type pos_start;
+       pos_type pos_end;
+       ErrorItem(docstring const & error, docstring const & description,
+                 int parid, pos_type posstart, pos_type posend);
        ErrorItem();
 };
 
+
 class ErrorList : private std::vector<ErrorItem>
 {
-public:        
+public:
        ErrorList() : std::vector<ErrorItem> () {};
 
        using std::vector<ErrorItem>::push_back;
@@ -47,5 +52,6 @@ public:
 };
 
 
+} // namespace lyx
 
 #endif