Skip to content

Commit e989445

Browse files
authored
Fix missing virtual declarations in Stream.h (#10348)
* Fix missing virtual declarations in Stream.h Fixes some changes made in PR #10328 * Remove the virtual destructor as Print class has one As pointed out by @JAndrassy
1 parent 2f89026 commit e989445

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cores/esp32/Stream.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ class Stream : public Print {
105105
float parseFloat(LookaheadMode lookahead = SKIP_ALL, char ignore = NO_IGNORE_CHAR);
106106
// float version of parseInt
107107

108-
size_t readBytes(char *buffer, size_t length); // read chars from stream into buffer
109-
size_t readBytes(uint8_t *buffer, size_t length) {
108+
virtual size_t readBytes(char *buffer, size_t length); // read chars from stream into buffer
109+
virtual size_t readBytes(uint8_t *buffer, size_t length) {
110110
return readBytes((char *)buffer, length);
111111
}
112112
// terminates if length characters have been read or timeout (see setTimeout)
@@ -120,7 +120,7 @@ class Stream : public Print {
120120
// returns the number of characters placed in the buffer (0 means no valid data found)
121121

122122
// Arduino String functions to be added here
123-
String readString();
123+
virtual String readString();
124124
String readStringUntil(char terminator);
125125

126126
protected:

0 commit comments

Comments
 (0)