Skip to content

Commit

Permalink
Use pragma once for headers
Browse files Browse the repository at this point in the history
  • Loading branch information
dashodanger committed Jun 10, 2024
1 parent 35fb5bd commit 87c86b0
Show file tree
Hide file tree
Showing 49 changed files with 52 additions and 234 deletions.
5 changes: 1 addition & 4 deletions source/bsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
//
//------------------------------------------------------------------------

#ifndef __AJBSP_BSP_H__
#define __AJBSP_BSP_H__
#pragma once

#include <string>

Expand Down Expand Up @@ -136,7 +135,5 @@ build_result_e BuildLevel(int lev_idx);

} // namespace ajbsp

#endif /* __AJBSP_BSP_H__ */

//--- editor settings ---
// vi:ts=4:sw=4:noexpandtab
5 changes: 1 addition & 4 deletions source/bsp_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
//
//------------------------------------------------------------------------

#ifndef __AJBSP_LOCAL_H__
#define __AJBSP_LOCAL_H__
#pragma once

#include <vector>

Expand Down Expand Up @@ -625,7 +624,5 @@ void RoundOffBspTree();

} // namespace ajbsp

#endif /* __AJBSP_LOCAL_H__ */

//--- editor settings ---
// vi:ts=4:sw=4:noexpandtab
5 changes: 1 addition & 4 deletions source/bsp_utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
//
//------------------------------------------------------------------------

#ifndef __AJBSP_UTILITY_H__
#define __AJBSP_UTILITY_H__
#pragma once

namespace ajbsp
{
Expand All @@ -34,7 +33,5 @@ double ComputeAngle(double dx, double dy);

} // namespace ajbsp

#endif /* __AJBSP_UTILITY_H__ */

//--- editor settings ---
// vi:ts=4:sw=4:noexpandtab
5 changes: 1 addition & 4 deletions source/bsp_wad.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
//
//------------------------------------------------------------------------

#ifndef __AJBSP_WAD_H__
#define __AJBSP_WAD_H__
#pragma once

#include <vector>

Expand Down Expand Up @@ -327,7 +326,5 @@ class Wad_file

} // namespace ajbsp

#endif /* __AJBSP_WAD_H__ */

//--- editor settings ---
// vi:ts=4:sw=4:noexpandtab
1 change: 0 additions & 1 deletion source/csg_doom.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

#include "csg_local.h"
#include "csg_main.h"
#include "dm_extra.h"
#include "g_doom.h"
#ifndef CONSOLE_ONLY
#include "hdr_fltk.h"
Expand Down
5 changes: 1 addition & 4 deletions source/csg_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
//
//------------------------------------------------------------------------

#ifndef __OBLIGE_CSG_LOCAL_H__
#define __OBLIGE_CSG_LOCAL_H__
#pragma once

#include <vector>

Expand Down Expand Up @@ -231,7 +230,5 @@ region_c *CSG_PointInRegion(double x, double y);

void CSG_Shade();

#endif /* __OBLIGE_CSG_LOCAL_H__ */

//--- editor settings ---
// vi:ts=4:sw=4:noexpandtab
5 changes: 1 addition & 4 deletions source/csg_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
//
//------------------------------------------------------------------------

#ifndef __OBLIGE_CSG_MAIN_H__
#define __OBLIGE_CSG_MAIN_H__
#pragma once

#include <stdint.h>

Expand Down Expand Up @@ -277,7 +276,5 @@ csg_property_set_c *CSG_LookupTexProps(std::string name);

void CSG_LinkBrushToEntity(csg_brush_c *B, std::string link_key);

#endif /* __OBLIGE_CSG_MAIN_H__ */

//--- editor settings ---
// vi:ts=4:sw=4:noexpandtab
2 changes: 0 additions & 2 deletions source/dm_extra.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
//
//------------------------------------------------------------------------

#include "dm_extra.h"

#include "csg_main.h"
#include "g_doom.h"
#ifndef CONSOLE_ONLY
Expand Down
28 changes: 0 additions & 28 deletions source/dm_extra.h

This file was deleted.

2 changes: 0 additions & 2 deletions source/dm_prefab.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@
//
//------------------------------------------------------------------------

#include "dm_prefab.h"

#include "csg_main.h"
#include "g_doom.h"
#include "poly.h"
Expand Down
28 changes: 0 additions & 28 deletions source/dm_prefab.h

This file was deleted.

5 changes: 1 addition & 4 deletions source/g_doom.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
//
//------------------------------------------------------------------------

#ifndef G_DOOM_H_
#define G_DOOM_H_
#pragma once

#include "m_lua.h"

Expand Down Expand Up @@ -290,7 +289,5 @@ struct raw_subsec_t

} // namespace Doom

#endif // G_DOOM_H_

//--- editor settings ---
// vi:ts=4:sw=4:noexpandtab
7 changes: 2 additions & 5 deletions source/hdr_fltk.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
//
//------------------------------------------------------------------------

#ifndef __OB_HDR_FLTK__
#define __OB_HDR_FLTK__
#pragma once

/* FLTK - Widget Library */

Expand Down Expand Up @@ -69,6 +68,4 @@
#include <FL/filename.H>
#include <FL/fl_ask.H>
#include <FL/fl_draw.H>
#include <FL/platform.H>

#endif // __OB_HDR_FLTK__
#include <FL/platform.H>
7 changes: 2 additions & 5 deletions source/hdr_lua.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@
//
//------------------------------------------------------------------------

#ifndef __OB_HDR_LUA__
#define __OB_HDR_LUA__
#pragma once

/* LUA Scripting Language */

#include "../../libraries/minilua/minilua.h"

#endif // __OB_HDR_LUA__
#include "../../libraries/minilua/minilua.h"
7 changes: 2 additions & 5 deletions source/hdr_ui.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
//
//------------------------------------------------------------------------

#ifndef __OB_HDR_UI_H__
#define __OB_HDR_UI_H__
#pragma once

#include "ui_boxes.h"
#include "ui_build.h"
Expand All @@ -29,6 +28,4 @@
#include "ui_map.h"
#include "ui_module.h"
#include "ui_widgets.h"
#include "ui_window.h"

#endif /* __OB_HDR_UI_H__ */
#include "ui_window.h"
5 changes: 1 addition & 4 deletions source/headers.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
//
//------------------------------------------------------------------------

#ifndef __OBLIGE_INCLUDES_H__
#define __OBLIGE_INCLUDES_H__
#pragma once

// we C++
#ifdef NULL
Expand Down Expand Up @@ -76,7 +75,5 @@

const char *ob_gettext(const char *s);

#endif /* __OBLIGE_INCLUDES_H__ */

//--- editor settings ---
// vi:ts=4:sw=4:noexpandtab
7 changes: 2 additions & 5 deletions source/images.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Various internal images used by Obsidian

#ifndef __OBSIDIAN_LOGOS_H__
#define __OBSIDIAN_LOGOS_H__
#pragma once

#include "headers.h"

Expand Down Expand Up @@ -5262,6 +5261,4 @@ const uint8_t image_data_RELIEF[64 * 64] = {
31, 17, 17, 17, 20, 20, 20, 20, 20, 20, 20, 17, 20, 20, 20, 20, 20, 20, 17, 17, 20, 20, 20,
20, 20};

const logo_image_t logo_RELIEF = {"RELIEF", 64, 64, image_data_RELIEF};

#endif /* __OBSIDIAN_LOGOS_H__ */
const logo_image_t logo_RELIEF = {"RELIEF", 64, 64, image_data_RELIEF};
5 changes: 1 addition & 4 deletions source/lib_argv.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
//
//------------------------------------------------------------------------

#ifndef LIB_ARGV_H_
#define LIB_ARGV_H_
#pragma once

#include <string>
#include <unordered_set>
Expand All @@ -40,7 +39,5 @@ bool IsOption(int index);

} // namespace argv

#endif /* __LIB_ARGV_H__ */

//--- editor settings ---
// vi:ts=4:sw=4:noexpandtab
5 changes: 1 addition & 4 deletions source/lib_parse.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
//
//----------------------------------------------------------------------------

#ifndef __AJ_PARSE_H__
#define __AJ_PARSE_H__
#pragma once

#include <string>

Expand Down Expand Up @@ -87,7 +86,5 @@ bool LEX_Boolean(const std::string &s);

} // namespace ajparse

#endif /* __AJ_PARSE_H__ */

//--- editor settings ---
// vi:ts=4:sw=4:noexpandtab
5 changes: 1 addition & 4 deletions source/lib_tga.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
//
//------------------------------------------------------------------------

#ifndef __OBLIGE_TGA_LOADER_H__
#define __OBLIGE_TGA_LOADER_H__
#pragma once

// this layout is compatible with Fl_Color (except for alpha)
typedef unsigned int rgb_color_t;
Expand Down Expand Up @@ -58,7 +57,5 @@ class tga_image_c

tga_image_c *TGA_LoadImage(const char *path);

#endif /* __OBLIGE_TGA_LOADER_H__ */

//--- editor settings ---
// vi:ts=4:sw=4:noexpandtab
5 changes: 1 addition & 4 deletions source/lib_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
//
//------------------------------------------------------------------------

#ifndef __LIB_UTIL_H__
#define __LIB_UTIL_H__
#pragma once

#include <stdint.h>

Expand Down Expand Up @@ -156,7 +155,5 @@ std::pair<double, double> AlongCoord(double along, double px1, double py1, doubl

bool VectorSameDir(double dx1, double dy1, double dx2, double dy2);

#endif /* __LIB_UTIL_H__ */

//--- editor settings ---
// vi:ts=4:sw=4:noexpandtab
5 changes: 1 addition & 4 deletions source/lib_wad.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
//
//------------------------------------------------------------------------

#ifndef LIB_WAD_H_
#define LIB_WAD_H_
#pragma once

/* WAD reading */

Expand Down Expand Up @@ -69,7 +68,5 @@ struct raw_wad_lump_t
};
#pragma pack(pop)

#endif

//--- editor settings ---
// vi:ts=4:sw=4:noexpandtab
Loading

0 comments on commit 87c86b0

Please sign in to comment.