Points: modernize C++11
* remove redundant void-arg * use nullptr
This commit is contained in:
@@ -96,7 +96,7 @@ void CmdPointsImport::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool CmdPointsImport::isActive(void)
|
||||
bool CmdPointsImport::isActive()
|
||||
{
|
||||
if (getActiveGuiDocument())
|
||||
return true;
|
||||
@@ -139,7 +139,7 @@ void CmdPointsExport::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool CmdPointsExport::isActive(void)
|
||||
bool CmdPointsExport::isActive()
|
||||
{
|
||||
return getSelection().countObjectsOfType(Points::Feature::getClassTypeId()) > 0;
|
||||
}
|
||||
@@ -176,7 +176,7 @@ void CmdPointsTransform::activated(int iMsg)
|
||||
commitCommand();
|
||||
}
|
||||
|
||||
bool CmdPointsTransform::isActive(void)
|
||||
bool CmdPointsTransform::isActive()
|
||||
{
|
||||
return getSelection().countObjectsOfType(Points::Feature::getClassTypeId()) > 0;
|
||||
}
|
||||
@@ -227,7 +227,7 @@ void CmdPointsConvert::activated(int iMsg)
|
||||
std::vector<Base::Vector3d> normals;
|
||||
data->getPoints(vertexes, normals, static_cast<float>(tol));
|
||||
if (!vertexes.empty()) {
|
||||
Points::Feature* fea = 0;
|
||||
Points::Feature* fea = nullptr;
|
||||
if (vertexes.size() == normals.size()) {
|
||||
fea = static_cast<Points::Feature*>(Base::Type::fromName("Points::FeatureCustom").createInstance());
|
||||
if (!fea) {
|
||||
@@ -268,7 +268,7 @@ void CmdPointsConvert::activated(int iMsg)
|
||||
abortCommand();
|
||||
}
|
||||
|
||||
bool CmdPointsConvert::isActive(void)
|
||||
bool CmdPointsConvert::isActive()
|
||||
{
|
||||
return getSelection().countObjectsOfType(Base::Type::fromName("App::GeoFeature")) > 0;
|
||||
}
|
||||
@@ -312,7 +312,7 @@ void CmdPointsPolyCut::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
bool CmdPointsPolyCut::isActive(void)
|
||||
bool CmdPointsPolyCut::isActive()
|
||||
{
|
||||
// Check for the selected mesh feature (all Mesh types)
|
||||
return getSelection().countObjectsOfType(Points::Feature::getClassTypeId()) > 0;
|
||||
@@ -356,7 +356,7 @@ void CmdPointsMerge::activated(int iMsg)
|
||||
updateActive();
|
||||
}
|
||||
|
||||
bool CmdPointsMerge::isActive(void)
|
||||
bool CmdPointsMerge::isActive()
|
||||
{
|
||||
return getSelection().countObjectsOfType(Points::Feature::getClassTypeId()) > 1;
|
||||
}
|
||||
@@ -464,12 +464,12 @@ void CmdPointsStructure::activated(int iMsg)
|
||||
updateActive();
|
||||
}
|
||||
|
||||
bool CmdPointsStructure::isActive(void)
|
||||
bool CmdPointsStructure::isActive()
|
||||
{
|
||||
return getSelection().countObjectsOfType(Points::Feature::getClassTypeId()) == 1;
|
||||
}
|
||||
|
||||
void CreatePointsCommands(void)
|
||||
void CreatePointsCommands()
|
||||
{
|
||||
Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager();
|
||||
rcCmdMgr.addCommand(new CmdPointsImport());
|
||||
|
||||
Reference in New Issue
Block a user