]> git.lyx.org Git - lyx.git/blobdiff - src/counters.C
last Friday's text*.C -> text_func shuffle
[lyx.git] / src / counters.C
index cc5d3328ee46609ca81cc402ebdc53b0efb3cfe9..a69b6a3c086e692148f6455af0ca56355fc70e68 100644 (file)
@@ -9,18 +9,17 @@
  *
  * ====================================================== */
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
 #include <config.h>
 
 #include "counters.h"
 #include "debug.h"
+#include "Lsstream.h"
 
 #include "support/lstrings.h"
 #include "support/LAssert.h"
 
+using namespace lyx::support;
+
 using std::endl;
 using std::vector;
 
@@ -172,7 +171,7 @@ void Counters::reset()
 
 void Counters::reset(string const & match)
 {
-       lyx::Assert(!match.empty());
+       Assert(!match.empty());
 
        CounterList::iterator it = counterList.begin();
        CounterList::iterator end = counterList.end();
@@ -261,11 +260,11 @@ string Counters::labelItem(string const & ctr,
        CounterList::iterator it = counterList.find(ctr);
        if (it == counterList.end()) {
                lyxerr << "Counter does not exist." << endl;
-               return "";
+               return string();
        }
 
        if (!first) {
-               s << "." << value(ctr);
+               s << '.' << value(ctr);
        } else {
                if (numbertype == "sectioning" || numbertype == "appendix") {
                        if (numbertype == "appendix") {