[go: up one dir, main page]

Skip to content

Style: Use of magic number in "configuratorwindow.cpp", line 659

Inside the file "configuratorwindow.cpp", line 659, there is a magic number in use:

if (err != 2) { // Retry only if the device was not found yet (as it may take some time to enumerate)

However, this number already has a meaning. For clarity, line 659 should be rewritten as:

if (err != CP2130::ERROR_NOT_FOUND) { // Retry only if the device was not found yet (as it may take some time to enumerate)

Edited by Samuel Lourenço