mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
Fix or suppress clang-tidy warnings (#8254)
This commit is contained in:
@@ -11,20 +11,17 @@
|
||||
|
||||
int main() {
|
||||
auto inst = nt::GetDefaultInstance();
|
||||
nt::AddLogger(
|
||||
inst,
|
||||
[](const nt::LogMessage& msg) {
|
||||
std::fputs(msg.message.c_str(), stderr);
|
||||
std::fputc('\n', stderr);
|
||||
},
|
||||
0, UINT_MAX);
|
||||
nt::StartClient(inst, "127.0.0.1", 10000);
|
||||
nt::AddLogger(inst, 0, UINT_MAX, [](const nt::Event& event) {
|
||||
std::fputs(event.GetLogMessage()->message.c_str(), stderr);
|
||||
std::fputc('\n', stderr);
|
||||
});
|
||||
nt::StartClient4(inst, "127.0.0.1");
|
||||
std::this_thread::sleep_for(std::chrono::seconds(2));
|
||||
|
||||
auto foo = nt::GetEntry(inst, "/foo");
|
||||
auto foo_val = nt::GetEntryValue(foo);
|
||||
if (foo_val && foo_val->IsDouble()) {
|
||||
std::printf("Got foo: %g\n", foo_val->GetDouble());
|
||||
if (foo_val && foo_val.IsDouble()) {
|
||||
std::printf("Got foo: %g\n", foo_val.GetDouble());
|
||||
}
|
||||
|
||||
auto bar = nt::GetEntry(inst, "/bar");
|
||||
|
||||
Reference in New Issue
Block a user