Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract this magic number 'nullptr' into a constant, variable declaration or an enum. #986

Closed
tomikais opened this issue Oct 25, 2016 · 2 comments · Fixed by #1019
Closed
Assignees
Labels
Milestone

Comments

@tomikais
Copy link

'nullptr' is detected as a magic number (Magic number should not be used).

It is possible to add 'nullptr' to the rule exception list to fix it. But I think it's better to fix the rule detection directly in the Cxx plugin!?

@guwirth guwirth self-assigned this Oct 31, 2016
@guwirth
Copy link
Collaborator

guwirth commented Oct 31, 2016

Hi @tomikais

@tomikais
Copy link
Author

tomikais commented Nov 2, 2016

Hi @guwirth

I'm using the latest version 0.9.6.

void InterfaceTestGui::resetGui()
{
  m_ui->txtXmlSend->clear();
  m_ui->txtXmlResult->clear();
  m_ui->txtXmlResultFormated->clear();

  m_ui->lblXmlInputPath->clear();
  m_ui->lblXmlOutputPath->clear();

  m_sendXmlFile = ""; 
  m_resultXmlFile = ""; 


  setCurrentFile(nullptr); // Extract this magic number 'nullptr' into a constant, variable declaration or an enum.
  statusBar()->showMessage(tr("GUI reset complete"), DISPLAY_TIME_STATUS_BAR);
}

Regards

@guwirth guwirth added this to the 0.9.7 milestone Dec 21, 2016
@guwirth guwirth added bug and removed question labels Dec 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants