diff options
-rw-r--r-- | glcddrivers/usbserlcd.c | 8 | ||||
-rw-r--r-- | glcddrivers/usbserlcd.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/glcddrivers/usbserlcd.c b/glcddrivers/usbserlcd.c index 9e75958..4c65c36 100644 --- a/glcddrivers/usbserlcd.c +++ b/glcddrivers/usbserlcd.c @@ -208,7 +208,7 @@ void cDriverUSBserLCD::Refresh(bool refreshAll) full_seq.Append(bytes, 0); if (refreshAll) { - port->WriteData(full_seq.GetString()); + port->WriteData(full_seq); // and reset RefreshCounter refreshCounter = 0; return; @@ -251,9 +251,9 @@ void cDriverUSBserLCD::Refresh(bool refreshAll) // Send the smaller data block. if (part_seq.GetLength() < full_seq.GetLength()) - port->WriteData(part_seq.GetString()); + port->WriteData(part_seq); else - port->WriteData(full_seq.GetString()); + port->WriteData(full_seq); } void cDriverUSBserLCD::SetBrightness(unsigned int percent) @@ -284,7 +284,7 @@ int cDriverUSBserLCDBuffer::GetLength() const { return buffer.length(); } -std::string cDriverUSBserLCDBuffer::GetString() const +cDriverUSBserLCDBuffer::operator std::string() const { return buffer; } diff --git a/glcddrivers/usbserlcd.h b/glcddrivers/usbserlcd.h index eb61431..674609a 100644 --- a/glcddrivers/usbserlcd.h +++ b/glcddrivers/usbserlcd.h @@ -59,7 +59,7 @@ public: cDriverUSBserLCDBuffer(int aExpectedBytes); int GetLength() const; void Append(std::string aBytes, uint16_t aAddress); - std::string GetString() const; + operator std::string() const; }; } // end of namespace |