PD: modernize C++11
* use nullptr
This commit is contained in:
@@ -194,7 +194,7 @@ void TaskHelixParameters::fillAxisCombo(bool forceRefill)
|
||||
addPartAxes();
|
||||
|
||||
//add "Select reference"
|
||||
addAxisToCombo(0, std::string(), tr("Select reference..."));
|
||||
addAxisToCombo(nullptr, std::string(), tr("Select reference..."));
|
||||
}
|
||||
|
||||
//add current link, if not in list and highlight it
|
||||
@@ -457,7 +457,7 @@ void TaskHelixParameters::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 |
|
||||
@@ -543,7 +543,7 @@ TaskHelixParameters::~TaskHelixParameters()
|
||||
{
|
||||
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;
|
||||
@@ -584,7 +584,7 @@ void TaskHelixParameters::getReferenceAxis(App::DocumentObject*& obj, std::vecto
|
||||
|
||||
int num = ui->axis->currentIndex();
|
||||
const App::PropertyLinkSub& lnk = *(axesInList.at(num));
|
||||
if (lnk.getValue() == 0) {
|
||||
if (lnk.getValue() == nullptr) {
|
||||
throw Base::RuntimeError("Still in reference selection mode; reference wasn't selected yet");
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user