Skip to content

Commit 8d25367

Browse files
committed
Remove more redundant return expressions.
1 parent 8eef0f1 commit 8d25367

File tree

87 files changed

+449
-907
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+449
-907
lines changed

Core/Libraries/Source/WWVegas/WW3D2/agg_def.cpp

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ AggregateDefClass::AggregateDefClass (void)
7171
::memset (&m_Info, 0, sizeof (m_Info));
7272
::memset (&m_MiscInfo, 0, sizeof (m_MiscInfo));
7373
m_MiscInfo.OriginalClassID = RenderObjClass::CLASSID_HLOD;
74-
return ;
75-
}
74+
}
7675

7776

7877
///////////////////////////////////////////////////////////////////////////////////
@@ -89,8 +88,7 @@ AggregateDefClass::AggregateDefClass (const AggregateDefClass &src)
8988

9089
// Invoke the assignment operator
9190
(*this) = src;
92-
return ;
93-
}
91+
}
9492

9593

9694
///////////////////////////////////////////////////////////////////////////////////
@@ -106,8 +104,7 @@ AggregateDefClass::AggregateDefClass (RenderObjClass &base_model)
106104
m_MiscInfo.OriginalClassID = RenderObjClass::CLASSID_HLOD;
107105

108106
Initialize (base_model);
109-
return ;
110-
}
107+
}
111108

112109

113110
///////////////////////////////////////////////////////////////////////////////////
@@ -125,8 +122,7 @@ AggregateDefClass::~AggregateDefClass (void)
125122
}
126123

127124
Free_Subobject_List ();
128-
return ;
129-
}
125+
}
130126

131127

132128
///////////////////////////////////////////////////////////////////////////////////
@@ -187,8 +183,7 @@ AggregateDefClass::Free_Subobject_List (void)
187183

188184
// Reset the lists contents
189185
m_SubobjectList.Delete_All ();
190-
return ;
191-
}
186+
}
192187

193188

194189
///////////////////////////////////////////////////////////////////////////////////
@@ -406,8 +401,7 @@ AggregateDefClass::Initialize (RenderObjClass &base_model)
406401

407402
// Release the model if necessary
408403
REF_PTR_RELEASE (pvanilla_model);
409-
return ;
410-
}
404+
}
411405

412406

413407

@@ -674,8 +668,7 @@ AggregateDefClass::Add_Subobject (const W3dAggregateSubobjectStruct &subobj_info
674668

675669
// Add this new entry to the list
676670
m_SubobjectList.Add (pnew_entry);
677-
return ;
678-
}
671+
}
679672

680673

681674
///////////////////////////////////////////////////////////////////////////////////

Core/Libraries/Source/WWVegas/WW3D2/animatedsoundmgr.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ AnimatedSoundMgrClass::Initialize (const char *ini_filename)
248248
// Don't re-initialize...
249249
//
250250
if (AnimSoundLists.Count () > 0) {
251-
return ;
252251
}
253252

254253
const char *DEFAULT_INI_FILENAME = "w3danimsound.ini";
@@ -423,8 +422,7 @@ AnimatedSoundMgrClass::Shutdown (void)
423422
}
424423

425424
AnimSoundLists.Delete_All ();
426-
return ;
427-
}
425+
}
428426

429427

430428
//////////////////////////////////////////////////////////////////////

Core/Libraries/Source/WWVegas/WW3D2/htree.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,6 @@ void HTreeClass::Init_Default(void)
9797
strcpy(Pivot[0].Name,"RootTransform");
9898
//::strcpy (Name, "Default");
9999
Name[0] = 0;
100-
return ;
101-
102-
103-
104100
}
105101

106102
/***********************************************************************************************

Core/Libraries/Source/WWVegas/WW3D2/prim_anim.h

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,7 @@ void PrimitiveAnimationChannelClass<T>::Set_Key (int index, const T &value, floa
194194
{
195195
m_Data[index].Set_Value (value);
196196
m_Data[index].Set_Time (time);
197-
return ;
198-
}
197+
}
199198

200199
/////////////////////////////////////////////////////////
201200
// Set_Key_Value
@@ -204,8 +203,7 @@ template<class T>
204203
void PrimitiveAnimationChannelClass<T>::Set_Key_Value (int index, const T &value)
205204
{
206205
m_Data[index].Set_Value (value);
207-
return ;
208-
}
206+
}
209207

210208
/////////////////////////////////////////////////////////
211209
// Add_Key
@@ -214,8 +212,7 @@ template<class T>
214212
void PrimitiveAnimationChannelClass<T>::Add_Key (const T &value, float time)
215213
{
216214
m_Data.Add (KeyClass (value, time));
217-
return ;
218-
}
215+
}
219216

220217
/////////////////////////////////////////////////////////
221218
// Insert_Key
@@ -224,8 +221,7 @@ template<class T>
224221
void PrimitiveAnimationChannelClass<T>::Insert_Key (int index, const T &value, float time)
225222
{
226223
m_Data.Insert (index, KeyClass (value, time));
227-
return ;
228-
}
224+
}
229225

230226
/////////////////////////////////////////////////////////
231227
// Delete_Key
@@ -234,8 +230,7 @@ template<class T>
234230
void PrimitiveAnimationChannelClass<T>::Delete_Key (int index)
235231
{
236232
m_Data.Delete (index);
237-
return ;
238-
}
233+
}
239234

240235
/////////////////////////////////////////////////////////
241236
// Reset
@@ -245,8 +240,7 @@ void PrimitiveAnimationChannelClass<T>::Reset (void)
245240
{
246241
m_Data.Delete_All ();
247242
m_LastIndex = 0;
248-
return ;
249-
}
243+
}
250244

251245
/////////////////////////////////////////////////////////////////////
252246
// operator=

Core/Libraries/Source/WWVegas/WW3D2/render2dsentence.cpp

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ Render2DSentenceClass::Render2DSentenceClass (void) :
7575
useHardWordWrap( false)
7676
{
7777
Shader = Render2DClass::Get_Default_Shader ();
78-
return ;
79-
}
78+
}
8079

8180

8281
////////////////////////////////////////////////////////////////////////////////////
@@ -88,8 +87,7 @@ Render2DSentenceClass::~Render2DSentenceClass (void)
8887
{
8988
REF_PTR_RELEASE (Font);
9089
Reset ();
91-
return ;
92-
}
90+
}
9391

9492

9593
////////////////////////////////////////////////////////////////////////////////////
@@ -102,8 +100,7 @@ Render2DSentenceClass::Set_Font (FontCharsClass *font)
102100
{
103101
Reset ();
104102
REF_PTR_SET (Font, font);
105-
return ;
106-
}
103+
}
107104

108105

109106
////////////////////////////////////////////////////////////////////////////////////
@@ -155,8 +152,7 @@ Render2DSentenceClass::Reset (void)
155152

156153
Release_Pending_Surfaces ();
157154
Reset_Sentence_Data ();
158-
return ;
159-
}
155+
}
160156

161157

162158
////////////////////////////////////////////////////////////////////////////////////
@@ -173,8 +169,7 @@ Render2DSentenceClass::Make_Additive (void)
173169
Shader.Set_Secondary_Gradient (ShaderClass::SECONDARY_GRADIENT_DISABLE);
174170

175171
Set_Shader (Shader);
176-
return ;
177-
}
172+
}
178173

179174

180175
////////////////////////////////////////////////////////////////////////////////////
@@ -244,8 +239,7 @@ void
244239
Render2DSentenceClass::Set_Location (const Vector2 &loc)
245240
{
246241
Location = loc;
247-
return ;
248-
}
242+
}
249243

250244

251245
////////////////////////////////////////////////////////////////////////////////////
@@ -300,8 +294,7 @@ Render2DSentenceClass::Reset_Sentence_Data (void)
300294
if (SentenceData.Count()>0) {
301295
SentenceData.Delete_All ();
302296
}
303-
return ;
304-
}
297+
}
305298

306299

307300
////////////////////////////////////////////////////////////////////////////////////
@@ -402,8 +395,7 @@ Render2DSentenceClass::Build_Textures (void)
402395
if (PendingSurfaces.Count()>0) {
403396
PendingSurfaces.Delete_All ();
404397
}
405-
return ;
406-
}
398+
}
407399

408400

409401
////////////////////////////////////////////////////////////////////////////////////
@@ -701,8 +693,7 @@ Render2DSentenceClass::Allocate_New_Surface (const WCHAR *text, bool justCalcExt
701693
//
702694
TextureOffset.Set (0, 0);
703695
TextureStartX = 0;
704-
return ;
705-
}
696+
}
706697

707698
float FindStartingXPos( const WCHAR *text )
708699
{
@@ -957,8 +948,7 @@ void Render2DSentenceClass::Build_Sentence_Centered (const WCHAR *text, int *hkX
957948
*hkX = hotKeyPosX;
958949
if(hkX)
959950
*hkY = hotKeyPosY;
960-
return ;
961-
}
951+
}
962952
////////////////////////////////////////////////////////////////////////////////////
963953
//
964954
// Build_Sentence_NotCentered
@@ -1188,8 +1178,7 @@ FontCharsClass::FontCharsClass (void) :
11881178
{
11891179
AlternateUnicodeFont = NULL;
11901180
::memset( ASCIICharArray, 0, sizeof (ASCIICharArray) );
1191-
return ;
1192-
}
1181+
}
11931182

11941183

11951184
////////////////////////////////////////////////////////////////////////////////////
@@ -1206,8 +1195,7 @@ FontCharsClass::~FontCharsClass (void)
12061195

12071196
Free_GDI_Font();
12081197
Free_Character_Arrays();
1209-
return ;
1210-
}
1198+
}
12111199

12121200

12131201
////////////////////////////////////////////////////////////////////////////////////
@@ -1644,8 +1632,7 @@ FontCharsClass::Initialize_GDI_Font (const char *font_name, int point_size, bool
16441632
// Create the actual font object
16451633
//
16461634
Create_GDI_Font (font_name);
1647-
return ;
1648-
}
1635+
}
16491636

16501637

16511638
////////////////////////////////////////////////////////////////////////////////////
@@ -1722,8 +1709,7 @@ FontCharsClass::Grow_Unicode_Array (WCHAR ch)
17221709
FirstUnicodeChar = first_index;
17231710
LastUnicodeChar = last_index;
17241711
UnicodeCharArray = new_array;
1725-
return ;
1726-
}
1712+
}
17271713

17281714

17291715
////////////////////////////////////////////////////////////////////////////////////

Core/Libraries/Source/WWVegas/WW3D2/ringobj.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,8 +1194,7 @@ PrototypeClass * RingLoaderClass::Load_W3D(ChunkLoadClass & cload)
11941194
RingPrototypeClass::RingPrototypeClass (void)
11951195
{
11961196
::memset (&Definition, 0, sizeof (Definition));
1197-
return ;
1198-
}
1197+
}
11991198

12001199
RingPrototypeClass::RingPrototypeClass(RingRenderObjClass *ring)
12011200
{
@@ -1241,13 +1240,11 @@ RingPrototypeClass::RingPrototypeClass(RingRenderObjClass *ring)
12411240
AlphaChannel = ring->Peek_Alpha_Channel ();
12421241
InnerScaleChannel = ring->Peek_Inner_Scale_Channel ();
12431242
OuterScaleChannel = ring->Peek_Outer_Scale_Channel ();
1244-
return ;
1245-
}
1243+
}
12461244

12471245
RingPrototypeClass::~RingPrototypeClass (void)
12481246
{
1249-
return ;
1250-
}
1247+
}
12511248

12521249
const char * RingPrototypeClass::Get_Name(void) const
12531250
{

0 commit comments

Comments
 (0)