modernize C++: use bool literals

This commit is contained in:
wmayer
2023-08-05 23:44:44 +02:00
committed by wwmayer
parent 51a34d1fbd
commit 2a88c7c7df
25 changed files with 46 additions and 46 deletions

View File

@@ -1216,12 +1216,12 @@ const BaseGeomPtrVector DrawViewPart::getVisibleFaceEdges() const
bool DrawViewPart::handleFaces()
{
return Preferences::getPreferenceGroup("General")->GetBool("HandleFaces", 1l);
return Preferences::getPreferenceGroup("General")->GetBool("HandleFaces", true);
}
bool DrawViewPart::newFaceFinder(void)
{
return Preferences::getPreferenceGroup("General")->GetBool("NewFaceFinder", 0l);
return Preferences::getPreferenceGroup("General")->GetBool("NewFaceFinder", false);
}
//! remove features that are useless without this DVP
@@ -1699,7 +1699,7 @@ bool DrawViewPart::prefIsoHid()
int DrawViewPart::prefIsoCount()
{
return Preferences::getPreferenceGroup("HLR")->GetBool("IsoCount", 0);
return Preferences::getPreferenceGroup("HLR")->GetBool("IsoCount", false);
}
// Python Drawing feature ---------------------------------------------------------

View File

@@ -1280,7 +1280,7 @@ void QGIViewPart::rotateView() {}
bool QGIViewPart::prefFaceEdges()
{
bool result = false;
result = Preferences::getPreferenceGroup("General")->GetBool("DrawFaceEdges", 0l);
result = Preferences::getPreferenceGroup("General")->GetBool("DrawFaceEdges", false);
return result;
}

View File

@@ -122,8 +122,8 @@ public:
}
void init()
{
page->m_atCursor = hGrp->GetBool("ZoomAtCursor", 1l);
page->m_invertZoom = hGrp->GetBool("InvertZoom", 0l);
page->m_atCursor = hGrp->GetBool("ZoomAtCursor", true);
page->m_invertZoom = hGrp->GetBool("InvertZoom", false);
page->m_zoomIncrement = hGrp->GetFloat("ZoomStep", 0.02);
page->m_reversePan = Preferences::getPreferenceGroup("General")->GetInt("KbPan", 1);

View File

@@ -100,7 +100,7 @@ void TaskLineDecor::getDefaults()
m_style = LineFormat::getDefEdgeStyle();
m_color = LineFormat::getDefEdgeColor();
m_weight = LineFormat::getDefEdgeWidth();
m_visible = 1;
m_visible = true;
//set defaults to format of 1st edge
if (!m_edges.empty()) {
@@ -136,7 +136,7 @@ void TaskLineDecor::getDefaults()
m_weight = partVP->LineWidth.getValue();
m_style = Qt::SolidLine; // = 1
m_color = LineFormat::getDefEdgeColor();
m_visible = 1;
m_visible = true;
}
}
}