[PATCH v1 1/5] rtems-utils.h: Remove ostream_guard

Ryan Long ryan.long at oarcorp.com
Wed Aug 4 15:54:20 UTC 2021


ostream_guard did not fix the "Not restoring ostream format" Coverity
issues as hoped, so there's no reason to have it.
---
 rtemstoolkit/rtems-utils.h | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/rtemstoolkit/rtems-utils.h b/rtemstoolkit/rtems-utils.h
index 81bf913..4ce9c68 100644
--- a/rtemstoolkit/rtems-utils.h
+++ b/rtemstoolkit/rtems-utils.h
@@ -47,26 +47,6 @@ namespace rtems
                bool        real = false,
                size_t      line_length = 16,
                uint32_t    offset = 0);
-
-    /*
-     * Save and restore the output stream's settings.
-     */
-    struct ostream_guard {
-      std::ostream&           o;
-      std::ios_base::fmtflags flags;
-
-      ostream_guard (std::ostream& o_)
-        : o (o_),
-          flags (o_.flags ())
-      {
-      }
-
-      ~ostream_guard ()
-      {
-        o.flags(flags);
-      }
-    };
-
   }
 }
 
-- 
1.8.3.1



More information about the devel mailing list