Skip to content

Commit

Permalink
Remove some include guards
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Nov 15, 2017
1 parent 038d860 commit dd2616a
Show file tree
Hide file tree
Showing 25 changed files with 15 additions and 111 deletions.
5 changes: 1 addition & 4 deletions src/editors/ParticleEditor/noise.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#ifndef noiseH
#define noiseH
#pragma once

float noise3(const Fvector& vec);
float fractalsum3(const Fvector& v, float freq, int octaves);
float turbulence3(const Fvector& v, float freq, int octaves);

#endif
4 changes: 0 additions & 4 deletions src/utils/ETools/xrXRC.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
//////////////////////////////////////////////////////////////////////

#pragma once
#if !defined(AFX_XRXRC_H__9AA25268_621F_4FCA_BD75_AF2E9822B8E3__INCLUDED_)
#define AFX_XRXRC_H__9AA25268_621F_4FCA_BD75_AF2E9822B8E3__INCLUDED_

#include "xrCDB/xrCDB.h"
#include "xrCore/_fbox.h"
Expand Down Expand Up @@ -76,5 +74,3 @@ class ENGINE_API xrXRC
IC void r_clear() { CL.r_clear(); };
};
ENGINE_API extern xrXRC XRC;

#endif // !defined(AFX_XRXRC_H__9AA25268_621F_4FCA_BD75_AF2E9822B8E3__INCLUDED_)
10 changes: 2 additions & 8 deletions src/xrCDB/Frustum.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
// Frustum.h: interface for the CFrustum class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_FRUSTUM_H__E66ED755_F741_49CF_8B2A_404CCF7067F2__INCLUDED_)
#define AFX_FRUSTUM_H__E66ED755_F741_49CF_8B2A_404CCF7067F2__INCLUDED_
#pragma once

#include "xrCDB.h"

//#pragma once

#include "xrCore/fixedvector.h"
#include "xrCore/FixedVector.h"

#pragma pack(push, 4)

Expand Down Expand Up @@ -102,5 +98,3 @@ class XRCDB_API CFrustum
}
};
#pragma pack(pop)

#endif // !defined(AFX_FRUSTUM_H__E66ED755_F741_49CF_8B2A_404CCF7067F2__INCLUDED_)
6 changes: 1 addition & 5 deletions src/xrCDB/ISpatial.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#pragma once
#ifndef XRENGINE_ISPATIAL_H_INCLUDED
#define XRENGINE_ISPATIAL_H_INCLUDED

#include "xrCore/xrPool.h"
//#include "xr_collide_defs.h"
Expand All @@ -16,7 +14,7 @@
0. Generic
* O(1) insertion
- radius completely determines "level"
- position completely detemines "node"
- position completely determines "node"
* O(1) removal
*
1. Rendering
Expand Down Expand Up @@ -276,5 +274,3 @@ XRCDB_API extern ISpatial_DB* g_SpatialSpace;
XRCDB_API extern ISpatial_DB* g_SpatialSpacePhysic;

#pragma pack(pop)

#endif // #ifndef XRENGINE_ISPATIAL_H_INCLUDED
9 changes: 2 additions & 7 deletions src/xrCDB/Intersect.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//---------------------------------------------------------------------------
#pragma once
#ifndef intersectH
#define intersectH

#include "xrCore/_matrix33.h"
#include "xrCore/_obb.h"
#include "xrCore/_sphere.h"
Expand Down Expand Up @@ -916,7 +914,4 @@ IC bool TestRayOBB(const Fvector3& origin, const Fvector3& direction, const Fobb

return true;
}
//----------------------------------------------------------------------------
};

#endif
} // namespace CDB
8 changes: 2 additions & 6 deletions src/xrCDB/xrCDB.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
//#pragma once
#ifndef XRCDB_H
#define XRCDB_H
#pragma once

#include "xrCore/Threading/Lock.hpp" // XXX: Remove from header. Put in .cpp.

Expand Down Expand Up @@ -229,7 +227,5 @@ class XRCDB_API CollectorPacked : public non_copyable
void clear();
};
#pragma warning(pop)
};

}
#pragma pack(pop)
#endif
6 changes: 1 addition & 5 deletions src/xrCDB/xrXRC.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_XRXRC_H__9AA25268_621F_4FCA_BD75_AF2E9822B8E3__INCLUDED_)
#define AFX_XRXRC_H__9AA25268_621F_4FCA_BD75_AF2E9822B8E3__INCLUDED_
//#pragma once
#pragma once

#include "xrCDB.h"
class IGameFont;
Expand Down Expand Up @@ -84,5 +82,3 @@ class XRCDB_API xrXRC
xrXRC(const char* name = "<unknown>") : name(name) {}
};
XRCDB_API extern xrXRC XRC;

#endif // !defined(AFX_XRXRC_H__9AA25268_621F_4FCA_BD75_AF2E9822B8E3__INCLUDED_)
6 changes: 1 addition & 5 deletions src/xrCDB/xr_area.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#ifndef __XR_AREA_H__
#define __XR_AREA_H__

#pragma once
#include "xr_collide_defs.h"

// refs
Expand Down Expand Up @@ -88,5 +86,3 @@ class XRCDB_API CObjectSpace
#endif
void DumpStatistics(IGameFont& font, IPerformanceAlert* alert);
};

#endif //__XR_AREA_H__
3 changes: 0 additions & 3 deletions src/xrCDB/xr_collide_defs.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#pragma once
#ifndef xr_collide_defsH
#define xr_collide_defsH

#include "xrCDB.h"

Expand Down Expand Up @@ -192,4 +190,3 @@ class rq_results
typedef BOOL rq_callback(rq_result& result, LPVOID user_data);
typedef BOOL test_callback(const ray_defs& rd, IGameObject* object, LPVOID user_data);
}
#endif
4 changes: 0 additions & 4 deletions src/xrParticles/noise.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#pragma once
#ifndef noiseH
#define noiseH

float noise3(const Fvector& vec);
float fractalsum3(const Fvector& v, float freq, int octaves);
float turbulence3(const Fvector& v, float freq, int octaves);

#endif
7 changes: 1 addition & 6 deletions src/xrParticles/particle_actions.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#pragma once
#ifndef particle_actionsH
#define particle_actionsH

namespace PAPI
{
Expand Down Expand Up @@ -80,7 +78,4 @@ class ParticleActions
m_bLocked = false;
}
};
};

//---------------------------------------------------------------------------
#endif
} // namespace PAPI
7 changes: 1 addition & 6 deletions src/xrParticles/particle_actions_collection.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#pragma once
#ifndef particle_actions_collectionH
#define particle_actions_collectionH

#include "particle_actions.h"
#include "particle_core.h"
Expand Down Expand Up @@ -303,7 +301,4 @@ struct PARTICLES_API PATurbulence : public ParticleAction

_METHODS;
};
};

//---------------------------------------------------------------------------
#endif
} // namespace PAPI
7 changes: 1 addition & 6 deletions src/xrParticles/particle_core.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#pragma once
#ifndef particle_coreH
#define particle_coreH

#define SQRT2PI 2.506628274631000502415765284811045253006f
#define ONEOVERSQRT2PI (1.f / SQRT2PI)
Expand Down Expand Up @@ -33,7 +31,4 @@ struct PARTICLES_API pDomain
#pragma pack(pop)
// misc
float NRand(float sigma = 1.0f);
};

//---------------------------------------------------------------------------
#endif
} // namespace PAPI
8 changes: 2 additions & 6 deletions src/xrParticles/particle_manager.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#pragma once
#ifndef particle_managerH
#define particle_managerH

#include "particle_actions.h"

namespace PAPI
Expand Down Expand Up @@ -48,7 +47,4 @@ class CParticleManager : public IParticleManager
u32 LoadActions(int alist_id, IReader& R) override;
void SaveActions(int alist_id, IWriter& W) override;
};
}

//---------------------------------------------------------------------------
#endif
} // namespace PAPI
4 changes: 0 additions & 4 deletions src/xrSound/OpenALDeviceList.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#pragma once
#ifndef ALDEVICELIST_H
#define ALDEVICELIST_H

#include "openal/al.h"
#include "openal/alc.h"
Expand Down Expand Up @@ -54,5 +52,3 @@ class ALDeviceList
void GetDeviceVersion(u32 index, int* major, int* minor);
void SelectBestDevice();
};

#endif // ALDEVICELIST_H
4 changes: 0 additions & 4 deletions src/xrSound/Sound.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#pragma once
#ifndef SoundH
#define SoundH

#include "xrCore/_types.h"
#include "xrCore/_flags.h"
Expand Down Expand Up @@ -315,5 +313,3 @@ class XRSOUND_API CSound_manager_interface

class CSound_manager_interface;
extern XRSOUND_API CSound_manager_interface* Sound;

#endif // include guard
4 changes: 0 additions & 4 deletions src/xrSound/SoundRender.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#pragma once
#ifndef SoundRenderH
#define SoundRenderH

#include "Sound.h"

Expand All @@ -19,5 +17,3 @@ const float s_f_def_source_footer = 0.0f; // sec of silence after buffer data, j
const u32 sdef_env_version = 4; // current version of env-def
const u32 sdef_level_version = 1; // current version of level-def
const float s_f_def_event_pulse = 0.5f; // sec

#endif
3 changes: 0 additions & 3 deletions src/xrSound/SoundRender_Cache.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#pragma once
#ifndef SoundRender_CacheH
#define SoundRender_CacheH

// --- just thoughts ---
// 1. LRU scheme
Expand Down Expand Up @@ -74,4 +72,3 @@ class CSoundRender_Cache
CSoundRender_Cache();
~CSoundRender_Cache();
};
#endif
3 changes: 0 additions & 3 deletions src/xrSound/SoundRender_Core.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#pragma once
#ifndef SoundRender_CoreH
#define SoundRender_CoreH

#include "SoundRender.h"
#include "SoundRender_Environment.h"
Expand Down Expand Up @@ -147,4 +145,3 @@ class CSoundRender_Core : public CSound_manager_interface
};

extern CSoundRender_Core* SoundRender;
#endif
3 changes: 0 additions & 3 deletions src/xrSound/SoundRender_CoreA.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#ifndef SoundRender_CoreAH
#define SoundRender_CoreAH
#pragma once

#include "SoundRender_Core.h"
Expand Down Expand Up @@ -70,4 +68,3 @@ class CSoundRender_CoreA : public CSoundRender_Core
const Fvector& listener_position() override { return Listener.position; }
};
extern CSoundRender_CoreA* SoundRenderA;
#endif
3 changes: 0 additions & 3 deletions src/xrSound/SoundRender_Emitter.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#ifndef SoundRender_EmitterH
#define SoundRender_EmitterH
#pragma once

#include "SoundRender.h"
Expand Down Expand Up @@ -119,4 +117,3 @@ class CSoundRender_Emitter : public CSound_emitter
CSoundRender_Emitter();
~CSoundRender_Emitter();
};
#endif
3 changes: 0 additions & 3 deletions src/xrSound/SoundRender_Environment.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#pragma once
#ifndef soundrender_environmentH
#define soundrender_environmentH

// refs
class XRSOUND_EDITOR_API CSoundRender_Environment : public CSound_environment
Expand Down Expand Up @@ -53,4 +51,3 @@ class XRSOUND_EDITOR_API SoundEnvironment_LIB
void Remove(int id);
SE_VEC& Library();
};
#endif
3 changes: 0 additions & 3 deletions src/xrSound/SoundRender_Source.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#pragma once
#ifndef SoundRender_SourceH
#define SoundRender_SourceH

#include "SoundRender_Cache.h"

Expand Down Expand Up @@ -44,4 +42,3 @@ class XRSOUND_EDITOR_API CSoundRender_Source : public CSound_source
u16 channels_num() const override { return m_wformat.nChannels; }
u32 bytes_total() const override { return dwBytesTotal; }
};
#endif
3 changes: 0 additions & 3 deletions src/xrSound/SoundRender_Target.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#pragma once
#ifndef SoundRender_TargetH
#define SoundRender_TargetH

#include "SoundRender.h"

Expand Down Expand Up @@ -43,4 +41,3 @@ class CSoundRender_Target
virtual void update() = 0;
virtual void fill_parameters() = 0;
};
#endif
3 changes: 0 additions & 3 deletions src/xrSound/SoundRender_TargetA.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#ifndef SoundRender_TargetAH
#define SoundRender_TargetAH
#pragma once

#include "Soundrender_Target.h"
Expand Down Expand Up @@ -34,4 +32,3 @@ class CSoundRender_TargetA : public CSoundRender_Target
void fill_parameters() override;
void source_changed();
};
#endif

0 comments on commit dd2616a

Please sign in to comment.