mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
[ntcore] NetworkTableInstance: Suppress unused lambda capture warning (#5947)
Clang warns that the "this" capture is not required, even though a member function is being called.
This commit is contained in:
@@ -257,6 +257,12 @@ inline void NetworkTableInstance::AddSchema(std::string_view name,
|
||||
::nt::AddSchema(m_handle, name, type, schema);
|
||||
}
|
||||
|
||||
// Suppress unused-lambda-capture warning on AddSchema() call
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-lambda-capture"
|
||||
#endif
|
||||
|
||||
template <wpi::ProtobufSerializable T>
|
||||
void NetworkTableInstance::AddProtobufSchema(wpi::ProtobufMessage<T>& msg) {
|
||||
msg.ForEachProtobufDescriptor(
|
||||
@@ -273,4 +279,8 @@ void NetworkTableInstance::AddStructSchema() {
|
||||
});
|
||||
}
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
} // namespace nt
|
||||
|
||||
Reference in New Issue
Block a user