PD: modernize C++11
* use nullptr
This commit is contained in:
@@ -145,7 +145,7 @@ void TaskRevolutionParameters::fillAxisCombo(bool forceRefill)
|
||||
}
|
||||
|
||||
//add "Select reference"
|
||||
addAxisToCombo(0,std::string(),tr("Select reference..."));
|
||||
addAxisToCombo(nullptr,std::string(),tr("Select reference..."));
|
||||
}//endif forceRefill
|
||||
|
||||
//add current link, if not in list
|
||||
@@ -248,7 +248,7 @@ void TaskRevolutionParameters::onAxisChanged(int num)
|
||||
oldRefName = oldSubRefAxis.front();
|
||||
|
||||
App::PropertyLinkSub &lnk = *(axesInList[num]);
|
||||
if (lnk.getValue() == 0) {
|
||||
if (lnk.getValue() == nullptr) {
|
||||
// enter reference selection mode
|
||||
TaskSketchBasedParameters::onSelectReference(AllowSelection::EDGE |
|
||||
AllowSelection::PLANAR |
|
||||
@@ -317,7 +317,7 @@ void TaskRevolutionParameters::getReferenceAxis(App::DocumentObject*& obj, std::
|
||||
|
||||
int num = ui->axis->currentIndex();
|
||||
const App::PropertyLinkSub &lnk = *(axesInList[num]);
|
||||
if (lnk.getValue() == 0) {
|
||||
if (lnk.getValue() == nullptr) {
|
||||
throw Base::RuntimeError("Still in reference selection mode; reference wasn't selected yet");
|
||||
} else {
|
||||
PartDesign::ProfileBased* pcRevolution = static_cast<PartDesign::ProfileBased*>(vp->getObject());
|
||||
@@ -344,7 +344,7 @@ TaskRevolutionParameters::~TaskRevolutionParameters()
|
||||
{
|
||||
try {
|
||||
//hide the parts coordinate system axis for selection
|
||||
PartDesign::Body * body = vp ? PartDesign::Body::findBodyOf(vp->getObject()) : 0;
|
||||
PartDesign::Body * body = vp ? PartDesign::Body::findBodyOf(vp->getObject()) : nullptr;
|
||||
if (body) {
|
||||
App::Origin *origin = body->getOrigin();
|
||||
ViewProviderOrigin* vpOrigin;
|
||||
|
||||
Reference in New Issue
Block a user