OSDN Git Service

003-08-21 Dave Brolley <brolley@redhat.com>
authorbrolley <brolley>
Fri, 29 Aug 2003 19:27:05 +0000 (19:27 +0000)
committerbrolley <brolley>
Fri, 29 Aug 2003 19:27:05 +0000 (19:27 +0000)
        * sidcpuutil.h (end_line): New method of basic_cpu::cpu_trace_stream.
        (operator<<): Use static_cast instead of dynamic_cast.

sid/include/ChangeLog
sid/include/sidcpuutil.h

index 08bbf27..de03f8c 100644 (file)
@@ -1,3 +1,8 @@
+2003-08-21  Dave Brolley  <brolley@redhat.com>
+
+       * sidcpuutil.h (end_line): New method of basic_cpu::cpu_trace_stream.
+       (operator<<): Use static_cast instead of dynamic_cast.
+
 2003-06-20  Frank Ch. Eigler  <fche@redhat.com>
 
        * sidattrutil.h (fixed_attribute_map_with_logging_component):
index 646d025..0fd74a8 100644 (file)
@@ -227,6 +227,13 @@ namespace sidutil
        std::ofstream::open (filename.c_str (), std::ios::app);
        cout_p = false;
       }
+      void end_line ()
+      {
+       if (LIKELY (cout_p))
+         std::cout << std::endl;
+       else
+         *this << std::endl;
+      }
       bool cout_p;
     };
 
@@ -611,7 +618,7 @@ public:
       if (LIKELY (s.cout_p))
        std::cout << t;
       else
-       dynamic_cast <std::ofstream&> (s) << t;
+       static_cast <std::ofstream&> (s) << t;
       return s;
     }