Skip to content

Commit

Permalink
remove Pragma.h
Browse files Browse the repository at this point in the history
  • Loading branch information
ab9rf committed Sep 16, 2024
1 parent ee8ada4 commit bd74e01
Show file tree
Hide file tree
Showing 17 changed files with 6 additions and 57 deletions.
11 changes: 6 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,17 @@ if(MSVC)
add_compile_options("/wd4267")

# suppress C4251 - VC++ will warn when exporting an entire class which contains members
# referencing unexported compound types is unsafe. because we don't guarantee a stable API
# for our exports, we don't really care about this, so we choose to be lazy and continue to
# export entire classes instead of exporting on a method-by-method basis
# referencing unexported compound types as this is potentially unsafe. because we don't
# guarantee a stable ABI for exports, we don't really care about this, and so we choose to
# be lazy and continue to export entire classes instead of exporting on a method-by-method basis
add_compile_options("/wd4251")

# suppress C4068 - VC++ will warn for unknown pragmas by default. this is equivalent to gcc
# -Wno-unknown-pragmas. we could work around this with sufficiently complex macros
# -Wno-unknown-pragmas (which is enabled for gcc below).
# we could work around this with sufficiently complex macros
add_compile_options("/wd4068")

# suppress C4244 - VC++ warns by default (with /Wall) about narrowing conversions that may lose data
# suppress C4244 - VC++ warns by default (with /W3) about narrowing conversions that may lose data
# (such as double -> int or int32_t -> int16_t). dfhack has many of these, mostly related to Lua
# this is equivalent to gcc -Wno_conversions which is the default as gcc -Wall doesn't enable -Wconversions
add_compile_options("/wd4244")
Expand Down
2 changes: 0 additions & 2 deletions library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,10 @@ set(MAIN_HEADERS
include/Memory.h
include/MiscUtils.h
include/Module.h
include/Pragma.h
include/MemAccess.h
include/ModuleFactory.h
include/PluginManager.h
include/PluginStatics.h
include/Pragma.h
include/RemoteClient.h
include/RemoteServer.h
include/RemoteTools.h
Expand Down
1 change: 0 additions & 1 deletion library/include/BitArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ distribution.
*/

#pragma once
#include "Pragma.h"
#include "Export.h"
#include "Error.h"
#include <stdint.h>
Expand Down
1 change: 0 additions & 1 deletion library/include/ColorText.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ distribution.
*/

#pragma once
#include "Pragma.h"
#include "Export.h"

#include <list>
Expand Down
1 change: 0 additions & 1 deletion library/include/Console.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ distribution.
*/

#pragma once
#include "Pragma.h"
#include "Export.h"
#include "ColorText.h"
#include <atomic>
Expand Down
2 changes: 0 additions & 2 deletions library/include/Core.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ distribution.

#pragma once

#include "Pragma.h"

#include "Console.h"
#include "Export.h"
#include "Hooks.h"
Expand Down
1 change: 0 additions & 1 deletion library/include/Error.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ distribution.

#include "Export.h"
#include "MiscUtils.h"
#include "Pragma.h"

namespace DFHack
{
Expand Down
3 changes: 0 additions & 3 deletions library/include/Internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,5 @@ distribution.
#define _FILE_OFFSET_BITS 64
#endif

// one file for telling the MSVC compiler where it can shove its pointless warnings
#include "Pragma.h"

// C99 integer types
#include <stdint.h>
1 change: 0 additions & 1 deletion library/include/MemAccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ distribution.
#ifndef PROCESS_H_INCLUDED
#define PROCESS_H_INCLUDED

#include "Pragma.h"
#include "Export.h"
#include <iostream>
#include <cstring>
Expand Down
33 changes: 0 additions & 33 deletions library/include/Pragma.h

This file was deleted.

1 change: 0 additions & 1 deletion library/include/RemoteClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ distribution.
*/

#pragma once
#include "Pragma.h"
#include "Export.h"
#include "ColorText.h"
#include "Core.h"
Expand Down
1 change: 0 additions & 1 deletion library/include/RemoteServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ distribution.
*/

#pragma once
#include "Pragma.h"
#include "Export.h"
#include "RemoteClient.h"
#include "Core.h"
Expand Down
1 change: 0 additions & 1 deletion library/include/RemoteTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ distribution.
*/

#pragma once
#include "Pragma.h"
#include "Export.h"
#include "RemoteServer.h"

Expand Down
1 change: 0 additions & 1 deletion library/include/TileTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ distribution.

#pragma once

#include "Pragma.h"
#include "Export.h"
#include "DataDefs.h"

Expand Down
1 change: 0 additions & 1 deletion library/include/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ distribution.

#include <algorithm>

#include "Pragma.h"
#include "Export.h"

#include "DataDefs.h"
Expand Down
1 change: 0 additions & 1 deletion library/include/VersionInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ distribution.
#include <vector>

#include "Export.h"
#include "Pragma.h"

namespace DFHack
{
Expand Down
1 change: 0 additions & 1 deletion library/include/VersionInfoFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ distribution.

#include <memory>

#include "Pragma.h"
#include "Export.h"

class TiXmlElement;
Expand Down

0 comments on commit bd74e01

Please sign in to comment.