Skip to content

Commit 68531e4

Browse files
committed
Removing optional<bool> since they can just be skipped if not set.
1 parent 95c6201 commit 68531e4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lldb/tools/lldb-dap/Protocol.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,10 @@ json::Value toJSON(const ErrorMessage &EM) {
182182
variables[var.first] = var.second;
183183
Result.insert({"variables", std::move(variables)});
184184
}
185-
if (EM.sendTelemetry && *EM.sendTelemetry)
186-
Result.insert({"sendTelemetry", *EM.sendTelemetry});
187-
if (EM.showUser && *EM.showUser)
188-
Result.insert({"showUser", *EM.showUser});
185+
if (EM.sendTelemetry)
186+
Result.insert({"sendTelemetry", EM.sendTelemetry});
187+
if (EM.showUser)
188+
Result.insert({"showUser", EM.showUser});
189189
if (EM.url)
190190
Result.insert({"url", EM.url});
191191
if (EM.urlLabel)

lldb/tools/lldb-dap/Protocol.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ struct ErrorMessage {
204204
uint64_t id;
205205
std::string format;
206206
std::optional<std::map<std::string, std::string>> variables;
207-
std::optional<bool> sendTelemetry;
208-
std::optional<bool> showUser;
207+
bool sendTelemetry;
208+
bool showUser;
209209
std::optional<std::string> url;
210210
std::optional<std::string> urlLabel;
211211
};

0 commit comments

Comments
 (0)