mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
More coding guidelines name changes, and use "using".
Change-Id: I48a898d13623749a55c469ba558155cd1467b4ce
This commit is contained in:
@@ -52,15 +52,11 @@ class MessageReader : private WireDecoder {
|
||||
unsigned int proto_rev);
|
||||
~MessageReader();
|
||||
|
||||
void SetProtocolRev(unsigned int proto_rev) {
|
||||
WireDecoder::SetProtocolRev(proto_rev);
|
||||
}
|
||||
|
||||
bool Run();
|
||||
|
||||
void Reset() { WireDecoder::Reset(); }
|
||||
|
||||
const char* GetError() const { return WireDecoder::GetError(); }
|
||||
using WireDecoder::set_proto_rev;
|
||||
using WireDecoder::Reset;
|
||||
using WireDecoder::error;
|
||||
|
||||
MessageReader(const MessageReader&) = delete;
|
||||
MessageReader& operator=(const MessageReader&) = delete;
|
||||
|
||||
@@ -17,17 +17,11 @@ class MessageWriter : private WireEncoder {
|
||||
explicit MessageWriter(unsigned int proto_rev) : WireEncoder(proto_rev) {}
|
||||
~MessageWriter();
|
||||
|
||||
void SetProtocolRev(unsigned int proto_rev) {
|
||||
WireEncoder::SetProtocolRev(proto_rev);
|
||||
}
|
||||
|
||||
void Reset() { WireEncoder::Reset(); }
|
||||
|
||||
const char* GetError() const { return WireEncoder::GetError(); }
|
||||
|
||||
const char* GetData() const { return WireEncoder::GetData(); }
|
||||
|
||||
std::size_t GetSize() const { return WireEncoder::GetSize(); }
|
||||
using WireEncoder::set_proto_rev;
|
||||
using WireEncoder::Reset;
|
||||
using WireEncoder::error;
|
||||
using WireEncoder::data;
|
||||
using WireEncoder::size;
|
||||
|
||||
void WriteKeepAlive();
|
||||
void WriteClientHello(const NT_String& self_id);
|
||||
|
||||
@@ -21,11 +21,11 @@ class WireDecoder {
|
||||
explicit WireDecoder(raw_istream& is, unsigned int proto_rev);
|
||||
~WireDecoder();
|
||||
|
||||
void SetProtocolRev(unsigned int proto_rev) { m_proto_rev = proto_rev; }
|
||||
void set_proto_rev(unsigned int proto_rev) { m_proto_rev = proto_rev; }
|
||||
|
||||
void Reset() { m_error = nullptr; }
|
||||
|
||||
const char* GetError() const { return m_error; }
|
||||
const char* error() const { return m_error; }
|
||||
|
||||
bool Read(char** buf, std::size_t len) {
|
||||
if (len > m_allocated) Realloc(len);
|
||||
|
||||
@@ -20,18 +20,18 @@ class WireEncoder {
|
||||
explicit WireEncoder(unsigned int proto_rev);
|
||||
~WireEncoder();
|
||||
|
||||
void SetProtocolRev(unsigned int proto_rev) { m_proto_rev = proto_rev; }
|
||||
void set_proto_rev(unsigned int proto_rev) { m_proto_rev = proto_rev; }
|
||||
|
||||
void Reset() {
|
||||
m_cur = m_start;
|
||||
m_error = nullptr;
|
||||
}
|
||||
|
||||
const char* GetError() const { return m_error; }
|
||||
const char* error() const { return m_error; }
|
||||
|
||||
const char* GetData() const { return m_start; }
|
||||
const char* data() const { return m_start; }
|
||||
|
||||
std::size_t GetSize() const { return m_cur - m_start; }
|
||||
std::size_t size() const { return m_cur - m_start; }
|
||||
|
||||
void Reserve(std::size_t len) {
|
||||
// assert(m_end > m_cur);
|
||||
|
||||
Reference in New Issue
Block a user