Skip to content

Commit d129790

Browse files
committed
[lldb-dap] Remove GetSigned from JSONUtils (NFC)
This function was replaced by GetInteger<T> which can handle both signed and unsigned values. It currently had one caller in JSONUtils, which this patch updates.
1 parent 8757aa0 commit d129790

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

lldb/tools/lldb-dap/JSONUtils.cpp

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -99,19 +99,6 @@ std::optional<bool> GetBoolean(const llvm::json::Object *obj,
9999
return std::nullopt;
100100
}
101101

102-
std::optional<int64_t> GetSigned(const llvm::json::Object &obj,
103-
llvm::StringRef key) {
104-
return obj.getInteger(key);
105-
}
106-
107-
std::optional<int64_t> GetSigned(const llvm::json::Object *obj,
108-
llvm::StringRef key) {
109-
if (obj == nullptr)
110-
return std::nullopt;
111-
112-
return GetSigned(*obj, key);
113-
}
114-
115102
bool ObjectContainsKey(const llvm::json::Object &obj, llvm::StringRef key) {
116103
return obj.find(key) != obj.end();
117104
}
@@ -263,7 +250,7 @@ void FillResponse(const llvm::json::Object &request,
263250
response.try_emplace("seq", (int64_t)0);
264251
EmplaceSafeString(response, "command",
265252
GetString(request, "command").value_or(""));
266-
const int64_t seq = GetSigned(request, "seq").value_or(0);
253+
const uint64_t seq = GetInteger<uint64_t>(request, "seq").value_or(0);
267254
response.try_emplace("request_seq", seq);
268255
response.try_emplace("success", true);
269256
}

0 commit comments

Comments
 (0)