lewapek / sds-dust-sensors-arduino-library

Library for Nova Fitness SDS dust sensors family (SDS011, SDS021)
MIT License
64 stars 19 forks source link

Make AbstractSerial begin and getStream methods pure virtual #11

Closed kolen closed 5 years ago

kolen commented 5 years ago

After #8, warning was introduced:

In file included from .piolibdeps/Nova Fitness Sds dust sensors library/src/SdsDustSensor.h:31:0,
from src/pm_sensor/sensor_pm_sds011.h:2,
from src/main.cpp:13:
.piolibdeps/Nova Fitness Sds dust sensors library/src/Serials.h: In member function 'virtual Stream* Serials::AbstractSerial::getStream()':
.piolibdeps/Nova Fitness Sds dust sensors library/src/Serials.h:19:34: warning: no return statement in function returning non-void [-Wreturn-type]
virtual Stream *getStream() {};
^

I think the idea was to make these methods pure virtual, without default implementation {} (which does not return proper Stream in case of getStream).

lewapek commented 5 years ago

Thanks for fixing this!