mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Fix NetworkTable::ContainsKey.
Previously this would always return false due to how explicit bool is evaluated in a return context. Also add a test for this function. Reported by: jcreigh
This commit is contained in:
@@ -207,7 +207,7 @@ bool NetworkTable::ContainsKey(StringRef key) const {
|
||||
llvm::SmallString<128> path(m_path);
|
||||
path += PATH_SEPARATOR_CHAR;
|
||||
path += key;
|
||||
return !nt::GetEntryValue(path);
|
||||
return nt::GetEntryValue(path) ? true : false;
|
||||
}
|
||||
|
||||
bool NetworkTable::ContainsSubTable(StringRef key) const {
|
||||
|
||||
Reference in New Issue
Block a user