Skip to content

Commit 3786349

Browse files
committed
Replace Standard_Boolean, Standard_True and Standard_False.
1 parent c6ac999 commit 3786349

2 files changed

Lines changed: 17 additions & 17 deletions

File tree

src/Visualization/TKService/GTests/Graphic3d_ZLayerSettings_Test.cxx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ TEST(Graphic3d_ZLayerSettingsTest, DefaultConstructor_DepthWriteEnabled)
5858
TEST(Graphic3d_ZLayerSettingsTest, SetVisible_False)
5959
{
6060
Graphic3d_ZLayerSettings aSettings;
61-
aSettings.SetVisible(Standard_False);
61+
aSettings.SetVisible(false);
6262
EXPECT_FALSE(aSettings.IsVisible()) << "Visibility should be FALSE after SetVisible(false)";
6363
}
6464

6565
TEST(Graphic3d_ZLayerSettingsTest, SetVisible_True)
6666
{
6767
Graphic3d_ZLayerSettings aSettings;
68-
aSettings.SetVisible(Standard_False);
69-
aSettings.SetVisible(Standard_True);
68+
aSettings.SetVisible(false);
69+
aSettings.SetVisible(true);
7070
EXPECT_TRUE(aSettings.IsVisible()) << "Visibility should be TRUE after SetVisible(true)";
7171
}
7272

@@ -78,15 +78,15 @@ TEST(Graphic3d_ZLayerSettingsTest, SetVisible_Toggle)
7878
EXPECT_TRUE(aSettings.IsVisible());
7979

8080
// Hide
81-
aSettings.SetVisible(Standard_False);
81+
aSettings.SetVisible(false);
8282
EXPECT_FALSE(aSettings.IsVisible());
8383

8484
// Show again
85-
aSettings.SetVisible(Standard_True);
85+
aSettings.SetVisible(true);
8686
EXPECT_TRUE(aSettings.IsVisible());
8787

8888
// Hide again
89-
aSettings.SetVisible(Standard_False);
89+
aSettings.SetVisible(false);
9090
EXPECT_FALSE(aSettings.IsVisible());
9191
}
9292

@@ -104,30 +104,30 @@ TEST(Graphic3d_ZLayerSettingsTest, SetName)
104104
TEST(Graphic3d_ZLayerSettingsTest, SetImmediate)
105105
{
106106
Graphic3d_ZLayerSettings aSettings;
107-
aSettings.SetImmediate(Standard_True);
107+
aSettings.SetImmediate(true);
108108
EXPECT_TRUE(aSettings.IsImmediate()) << "IsImmediate should be TRUE after SetImmediate(true)";
109109
}
110110

111111
TEST(Graphic3d_ZLayerSettingsTest, SetRaytracable)
112112
{
113113
Graphic3d_ZLayerSettings aSettings;
114-
aSettings.SetRaytracable(Standard_False);
114+
aSettings.SetRaytracable(false);
115115
EXPECT_FALSE(aSettings.IsRaytracable())
116116
<< "IsRaytracable should be FALSE after SetRaytracable(false)";
117117
}
118118

119119
TEST(Graphic3d_ZLayerSettingsTest, SetEnableDepthTest)
120120
{
121121
Graphic3d_ZLayerSettings aSettings;
122-
aSettings.SetEnableDepthTest(Standard_False);
122+
aSettings.SetEnableDepthTest(false);
123123
EXPECT_FALSE(aSettings.ToEnableDepthTest())
124124
<< "Depth test should be disabled after SetEnableDepthTest(false)";
125125
}
126126

127127
TEST(Graphic3d_ZLayerSettingsTest, SetEnableDepthWrite)
128128
{
129129
Graphic3d_ZLayerSettings aSettings;
130-
aSettings.SetEnableDepthWrite(Standard_False);
130+
aSettings.SetEnableDepthWrite(false);
131131
EXPECT_FALSE(aSettings.ToEnableDepthWrite())
132132
<< "Depth write should be disabled after SetEnableDepthWrite(false)";
133133
}
@@ -139,7 +139,7 @@ TEST(Graphic3d_ZLayerSettingsTest, SetEnableDepthWrite)
139139
TEST(Graphic3d_ZLayerSettingsTest, DumpJson_ContainsVisibility)
140140
{
141141
Graphic3d_ZLayerSettings aSettings;
142-
aSettings.SetVisible(Standard_True);
142+
aSettings.SetVisible(true);
143143

144144
std::ostringstream aStream;
145145
aSettings.DumpJson(aStream);
@@ -152,7 +152,7 @@ TEST(Graphic3d_ZLayerSettingsTest, DumpJson_ContainsVisibility)
152152
TEST(Graphic3d_ZLayerSettingsTest, DumpJson_VisibilityValueTrue)
153153
{
154154
Graphic3d_ZLayerSettings aSettings;
155-
aSettings.SetVisible(Standard_True);
155+
aSettings.SetVisible(true);
156156

157157
std::ostringstream aStream;
158158
aSettings.DumpJson(aStream);
@@ -167,7 +167,7 @@ TEST(Graphic3d_ZLayerSettingsTest, DumpJson_VisibilityValueTrue)
167167
TEST(Graphic3d_ZLayerSettingsTest, DumpJson_VisibilityValueFalse)
168168
{
169169
Graphic3d_ZLayerSettings aSettings;
170-
aSettings.SetVisible(Standard_False);
170+
aSettings.SetVisible(false);
171171

172172
std::ostringstream aStream;
173173
aSettings.DumpJson(aStream);

src/Visualization/TKService/Graphic3d/Graphic3d_ZLayerSettings.hxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct Graphic3d_ZLayerSettings
3737
myToEnableDepthWrite(true),
3838
myToClearDepth(true),
3939
myToRenderInDepthPrepass(true),
40-
myVisible(Standard_True)
40+
myVisible(true)
4141
{
4242
}
4343

@@ -178,11 +178,11 @@ struct Graphic3d_ZLayerSettings
178178

179179
//! Return if layer should be visible; TRUE by default.
180180
//! @return TRUE if layer is visible, FALSE if layer is hidden.
181-
Standard_Boolean IsVisible() const { return myVisible; }
181+
bool IsVisible() const { return myVisible; }
182182

183183
//! Set if the layer should be visible.
184184
//! @param theVisible If TRUE, the layer will be rendered; if FALSE, the layer will be hidden.
185-
void SetVisible(const Standard_Boolean theVisible) { myVisible = theVisible; }
185+
void SetVisible(const bool theVisible) { myVisible = theVisible; }
186186

187187
//! Dumps the content of me into the stream
188188
void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const
@@ -224,7 +224,7 @@ protected:
224224
bool myToEnableDepthWrite; //!< option to enable write depth values
225225
bool myToClearDepth; //!< option to clear depth values before drawing the layer
226226
bool myToRenderInDepthPrepass;//!< option to render layer within depth pre-pass
227-
Standard_Boolean myVisible; //!< option to show or hide the layer
227+
bool myVisible; //!< option to show or hide the layer
228228
// clang-format on
229229
};
230230

0 commit comments

Comments
 (0)