Skip to content

Commit 7a7839e

Browse files
committed
Use better check of string emptiness in SPI
1 parent fa35aa7 commit 7a7839e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/arduino/SPI.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class SPIClass: public ObservableDataStream {
8585
advertiseByte((char)data);
8686

8787
// pop bus->memory data from its queue and return it
88-
if (!dataIn->length()) return 0;
88+
if (dataIn->empty()) return 0;
8989
char ret = (*dataIn)[0];
9090
*dataIn = dataIn->substr(1, dataIn->length());
9191
return ret;

0 commit comments

Comments
 (0)