diff options
Diffstat (limited to 'source/compiler-core')
| -rw-r--r-- | source/compiler-core/slang-command-line-args.h | 16 | ||||
| -rw-r--r-- | source/compiler-core/slang-diagnostic-sink.h | 2 |
2 files changed, 8 insertions, 10 deletions
diff --git a/source/compiler-core/slang-command-line-args.h b/source/compiler-core/slang-command-line-args.h index 31807cd48..b2bd48c61 100644 --- a/source/compiler-core/slang-command-line-args.h +++ b/source/compiler-core/slang-command-line-args.h @@ -109,17 +109,15 @@ struct CommandLineReader /// Set the current index void setIndex(Index index) { SLANG_ASSERT(index >= 0 && index <= m_args->getArgCount()); m_index = index; } + void init(CommandLineArgs* args, DiagnosticSink* sink) { m_args = args; m_sink = sink; m_index = 0; } + /// Set up reader with args - CommandLineReader(CommandLineArgs* args, DiagnosticSink* sink): - m_args(args), - m_index(0), - m_sink(sink) - { - } + CommandLineReader(CommandLineArgs* args, DiagnosticSink* sink) { init(args, sink); } + CommandLineReader() = default; - DiagnosticSink* m_sink; - CommandLineArgs* m_args; - Index m_index; + DiagnosticSink* m_sink = nullptr; + CommandLineArgs* m_args = nullptr; + Index m_index = 0; }; struct DownstreamArgs diff --git a/source/compiler-core/slang-diagnostic-sink.h b/source/compiler-core/slang-diagnostic-sink.h index 5131e5194..ebd43b456 100644 --- a/source/compiler-core/slang-diagnostic-sink.h +++ b/source/compiler-core/slang-diagnostic-sink.h @@ -255,7 +255,7 @@ public: /// Default Ctor DiagnosticSink(): m_sourceManager(nullptr), - m_sourceLocationLexer (nullptr) + m_sourceLocationLexer(nullptr) { } |
