[Lldb-commits] [lldb] r372830 - [lldb][NFC] Use default member initializers in ReadBufferAndDumpToStreamOptions

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 25 01:55:55 PDT 2019


Author: teemperor
Date: Wed Sep 25 01:55:55 2019
New Revision: 372830

URL: http://llvm.org/viewvc/llvm-project?rev=372830&view=rev
Log:
[lldb][NFC] Use default member initializers in ReadBufferAndDumpToStreamOptions

Modified:
    lldb/trunk/include/lldb/DataFormatters/StringPrinter.h

Modified: lldb/trunk/include/lldb/DataFormatters/StringPrinter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/StringPrinter.h?rev=372830&r1=372829&r2=372830&view=diff
==============================================================================
--- lldb/trunk/include/lldb/DataFormatters/StringPrinter.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/StringPrinter.h Wed Sep 25 01:55:55 2019
@@ -144,11 +144,7 @@ public:
 
   class ReadBufferAndDumpToStreamOptions {
   public:
-    ReadBufferAndDumpToStreamOptions()
-        : m_data(), m_stream(nullptr), m_prefix_token(), m_suffix_token(),
-          m_quote('"'), m_source_size(0), m_escape_non_printables(true),
-          m_zero_is_terminator(true), m_is_truncated(false),
-          m_language_type(lldb::eLanguageTypeUnknown) {}
+    ReadBufferAndDumpToStreamOptions() = default;
 
     ReadBufferAndDumpToStreamOptions(ValueObject &valobj);
 
@@ -241,15 +237,15 @@ public:
 
   private:
     DataExtractor m_data;
-    Stream *m_stream;
+    Stream *m_stream = nullptr;
     std::string m_prefix_token;
     std::string m_suffix_token;
-    char m_quote;
-    uint32_t m_source_size;
-    bool m_escape_non_printables;
-    bool m_zero_is_terminator;
-    bool m_is_truncated;
-    lldb::LanguageType m_language_type;
+    char m_quote = '"';
+    uint32_t m_source_size = 0;
+    bool m_escape_non_printables = true;
+    bool m_zero_is_terminator = true;
+    bool m_is_truncated = false;
+    lldb::LanguageType m_language_type = lldb::eLanguageTypeUnknown;
   };
 
   // I can't use a std::unique_ptr for this because the Deleter is a template




More information about the lldb-commits mailing list