]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathAutoCorrect.cpp
de.po
[lyx.git] / src / mathed / MathAutoCorrect.cpp
index 85f699c4044419928d3cad06f303153c73dbc179..fc4ad440d20919fd5576c3b6820a57710dd2d079 100644 (file)
@@ -35,7 +35,8 @@ namespace {
 class Correction {
 public:
        ///
-       Correction() {}
+       /// \brief Correction
+       Correction() : from2_(0) {}
        ///
        bool correct(MathAtom & at, char_type c) const;
        ///
@@ -72,13 +73,6 @@ bool Correction::read(idocstream & is)
 }
 
 
-void Correction::write(odocstream & os) const
-{
-       os << "from: '" << from1_ << "' and '" << from2_
-          << "' to '" << to_ << '\'' << endl;
-}
-
-
 bool Correction::correct(MathAtom & at, char_type c) const
 {
        //LYXERR(Debug::MATHED,
@@ -94,6 +88,14 @@ bool Correction::correct(MathAtom & at, char_type c) const
 }
 
 
+#if 0
+void Correction::write(odocstream & os) const
+{
+       os << "from: '" << from1_ << "' and '" << from2_
+          << "' to '" << to_ << '\'' << endl;
+}
+
+
 idocstream & operator>>(idocstream & is, Correction & corr)
 {
        corr.read(is);
@@ -106,7 +108,7 @@ odocstream & operator<<(odocstream & os, Correction & corr)
        corr.write(os);
        return os;
 }
-
+#endif
 
 
 
@@ -149,7 +151,7 @@ void initAutoCorrect()
        string line;
        ifstream is(file.toFilesystemEncoding().c_str());
        while (getline(is, line)) {
-               if (line.size() == 0 || line[0] == '#') {
+               if (line.empty() || line[0] == '#') {
                        //LYXERR(Debug::MATHED, "ignoring line '" << line << '\'');
                        continue;
                }
@@ -167,10 +169,10 @@ void initAutoCorrect()
 }
 
 
-} // namespace anon
+} // namespace
 
 
-bool math_autocorrect(MathAtom & at, char c)
+bool math_autocorrect(MathAtom & at, char_type c)
 {
        static bool initialized = false;