boblemaire / IoTaWatt

IoTaWatt Open WiFi Electric Energy Monitor
https://iotawatt.com
GNU General Public License v3.0
647 stars 179 forks source link

Coding style nit: use boolean OR, not bitwise OR #242

Closed jtbattle closed 4 years ago

jtbattle commented 5 years ago

I don't have a device and am not working on this code, but I was poking around here because I was thinking about getting a system (95% sure). Anyway, I noticed this recent change in CSVquery.cpp, line 284:

 if(method.length() != 2 | method[1] < '0' | method[1] > '9') return false;

Those bitwise ORs should really be boolean ORs. It won't make a functional difference, of course, but conceptually it would be better.

boblemaire commented 4 years ago

While conceptually the same, this would be better functionally if submitted as a PR.