mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
WireDecoder: Add overloads for StringValue and Value.
Change-Id: Idb41fd16fec8efc8b984c1a9b4d225829d16e344 StringValue: Add comparison operators.
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "ntcore.h"
|
||||
#include "leb128.h"
|
||||
#include "raw_istream.h"
|
||||
#include "Value.h"
|
||||
|
||||
namespace ntimpl {
|
||||
|
||||
@@ -101,6 +102,15 @@ class WireDecoder {
|
||||
bool ReadValue(NT_Type type, NT_Value* value);
|
||||
bool ReadString(NT_String* str);
|
||||
|
||||
bool ReadValue(NT_Type type, Value* value) {
|
||||
NT_DisposeValue(value);
|
||||
return ReadValue(type, static_cast<NT_Value*>(value));
|
||||
}
|
||||
bool ReadString(StringValue* str) {
|
||||
NT_DisposeString(str);
|
||||
return ReadString(static_cast<NT_String*>(str));
|
||||
}
|
||||
|
||||
WireDecoder(const WireDecoder&) = delete;
|
||||
WireDecoder& operator=(const WireDecoder&) = delete;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user