]> granicus.if.org Git - re2c/commitdiff
- Move null_stream into haeder
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Thu, 29 Dec 2005 22:40:21 +0000 (22:40 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Thu, 29 Dec 2005 22:40:21 +0000 (22:40 +0000)
code.cc
code.h

diff --git a/code.cc b/code.cc
index 0c41c55c79d58455fb5b72bb208840d3b3bd2fe5..32e0fab598ab6cc44768f1fed86b1e1252d8a49d 100644 (file)
--- a/code.cc
+++ b/code.cc
@@ -1009,38 +1009,6 @@ void DFA::split(State *s)
        s->go.span[0].to = move;
 }
 
-class null_stream: public std::ostream
-{
-public:
-       null_stream()
-               : std::ostream(&ns)
-       {
-       }
-
-       null_stream& put(char_type)
-       {
-               // nothing to do
-               return *this;
-       }
-       
-       null_stream& write(const char_type *, std::streamsize)
-       {
-               // nothing to do
-               return *this;
-       }
-
-protected:
-       class null_streambuf: public std::streambuf
-       {
-       public:
-               null_streambuf()
-                       : std::streambuf()
-               {
-               }       
-       };
-       null_streambuf   ns;
-};
-
 void DFA::emit(std::ostream &o)
 {
        static uint label = 0;
diff --git a/code.h b/code.h
index e44488d3378a30d28876d09d721b57cfa37045b5..2259fda9e64180203f17f600f2edd60a900229cd 100755 (executable)
--- a/code.h
+++ b/code.h
@@ -28,6 +28,38 @@ public:
        ~BitMap();
 };
 
+class null_stream: public std::ostream
+{
+public:
+       null_stream()
+               : std::ostream(&ns)
+       {
+       }
+
+       null_stream& put(char_type)
+       {
+               // nothing to do
+               return *this;
+       }
+       
+       null_stream& write(const char_type *, std::streamsize)
+       {
+               // nothing to do
+               return *this;
+       }
+
+protected:
+       class null_streambuf: public std::streambuf
+       {
+       public:
+               null_streambuf()
+                       : std::streambuf()
+               {
+               }       
+       };
+       null_streambuf   ns;
+};
+
 } // end namespace re2c
 
 #endif