Clean up comments, USB flash, NULLs

This commit is contained in:
Scott Lahteine
2020-10-24 17:13:10 -05:00
parent 00fbe50bbe
commit ec23e37a4a
45 changed files with 231 additions and 238 deletions

View File

@ -245,7 +245,7 @@ public:
#endif
// The code value pointer was set
FORCE_INLINE static bool has_value() { return value_ptr != nullptr; }
FORCE_INLINE static bool has_value() { return !!value_ptr; }
// Seen a parameter with a value
static inline bool seenval(const char c) { return seen(c) && has_value(); }

View File

@ -180,7 +180,7 @@ bool GCodeQueue::enqueue_one(const char* cmd) {
* Return 'true' if any commands were processed.
*/
bool GCodeQueue::process_injected_command_P() {
if (injected_commands_P == nullptr) return false;
if (!injected_commands_P) return false;
char c;
size_t i = 0;
@ -480,7 +480,7 @@ void GCodeQueue::get_serial_commands() {
if (npos) {
bool M110 = strstr_P(command, PSTR("M110")) != nullptr;
const bool M110 = !!strstr_P(command, PSTR("M110"));
if (M110) {
char* n2pos = strchr(command + 4, 'N');