A few more cases of using #pragma once instead of include guards.
--- a/src/in_snsf/snes9x/apu/SNES_SPC.h
+++ b/src/in_snsf/snes9x/apu/SNES_SPC.h
@@ -1,8 +1,7 @@
// SNES SPC-700 APU emulator
// snes_spc 0.9.0
-#ifndef SNES_SPC_H
-#define SNES_SPC_H
+#pragma once
#include "SPC_DSP.h"
#include "blargg_endian.h"
@@ -236,5 +235,3 @@
inline void SNES_SPC::spc_allow_time_overflow(bool allow) { this->allow_time_overflow = allow; }
-#endif
-
--- a/src/in_snsf/snes9x/apu/SPC_CPU.h
+++ b/src/in_snsf/snes9x/apu/SPC_CPU.h
@@ -10,6 +10,8 @@
details. You should have received a copy of the GNU Lesser General Public
License along with this module; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#pragma once
//// Memory access
--- a/src/in_snsf/snes9x/apu/SPC_DSP.h
+++ b/src/in_snsf/snes9x/apu/SPC_DSP.h
@@ -1,8 +1,7 @@
// Highly accurate SNES SPC-700 DSP emulator
// snes_spc 0.9.0
-#ifndef SPC_DSP_H
-#define SPC_DSP_H
+#pragma once
#include "blargg_common.h"
@@ -285,5 +284,3 @@
inline void SPC_DSP::mute_voices(int mask) { this->m.mute_mask = mask; }
-#endif
-
--- a/src/in_snsf/snes9x/apu/apu.h
+++ b/src/in_snsf/snes9x/apu/apu.h
@@ -175,8 +175,7 @@
Nintendo Co., Limited and its subsidiary companies.
***********************************************************************************/
-#ifndef _APU_H_
-#define _APU_H_
+#pragma once
#include "../snes9x.h"
#include "SNES_SPC.h"
@@ -200,5 +199,3 @@
void S9xSetSoundMute(bool);
bool S9xMixSamples(uint8_t *, int);
-#endif
-
--- a/src/in_snsf/snes9x/apu/blargg_common.h
+++ b/src/in_snsf/snes9x/apu/blargg_common.h
@@ -2,19 +2,14 @@
// To change configuration options, modify blargg_config.h, not this file.
// snes_spc 0.9.0
-#ifndef BLARGG_COMMON_H
-#define BLARGG_COMMON_H
+#pragma once
#include <cstddef>
#include <cstdlib>
#include <cassert>
#include <climits>
-#undef BLARGG_COMMON_H
-// allow blargg_config.h to #include blargg_common.h
#include "blargg_config.h"
-#ifndef BLARGG_COMMON_H
-#define BLARGG_COMMON_H
// BLARGG_COMPILER_HAS_BOOL: If 0, provides bool support for old compiler. If 1,
// compiler is assumed to support bool. If undefined, availability is determined.
@@ -42,6 +37,3 @@
#include <cstdint>
-#endif
-#endif
-
--- a/src/in_snsf/snes9x/apu/blargg_config.h
+++ b/src/in_snsf/snes9x/apu/blargg_config.h
@@ -1,8 +1,7 @@
// snes_spc 0.9.0 user configuration file. Don't replace when updating library.
// snes_spc 0.9.0
-#ifndef BLARGG_CONFIG_H
-#define BLARGG_CONFIG_H
+#pragma once
// Uncomment if automatic byte-order determination doesn't work
//#define BLARGG_BIG_ENDIAN 1
@@ -10,5 +9,3 @@
// Uncomment if you get errors in the bool section of blargg_common.h
//#define BLARGG_COMPILER_HAS_BOOL 1
-#endif
-
--- a/src/in_snsf/snes9x/apu/blargg_endian.h
+++ b/src/in_snsf/snes9x/apu/blargg_endian.h
@@ -1,8 +1,7 @@
// CPU Byte Order Utilities
// snes_spc 0.9.0
-#ifndef BLARGG_ENDIAN
-#define BLARGG_ENDIAN
+#pragma once
#include "blargg_common.h"
@@ -65,5 +64,3 @@
p[0] = static_cast<unsigned char>(n);
}
-#endif
-
--- a/src/in_snsf/snes9x/apu/bspline_resampler.h
+++ b/src/in_snsf/snes9x/apu/bspline_resampler.h
@@ -1,7 +1,6 @@
/* Simple resampler based on bsnes's ruby audio library */
-#ifndef __BSPLINE_RESAMPLER_H
-#define __BSPLINE_RESAMPLER_H
+#pragma once
#include <cmath>
#include "resampler.h"
@@ -125,5 +124,3 @@
}
};
-#endif /* __BSPLINE_RESAMPLER_H */
-
--- a/src/in_snsf/snes9x/apu/hermite_resampler.h
+++ b/src/in_snsf/snes9x/apu/hermite_resampler.h
@@ -1,7 +1,6 @@
/* Simple resampler based on bsnes's ruby audio library */
-#ifndef __HERMITE_RESAMPLER_H
-#define __HERMITE_RESAMPLER_H
+#pragma once
#include <cmath>
#include "resampler.h"
@@ -130,5 +129,3 @@
}
};
-#endif /* __HERMITE_RESAMPLER_H */
-
--- a/src/in_snsf/snes9x/apu/linear_resampler.h
+++ b/src/in_snsf/snes9x/apu/linear_resampler.h
@@ -1,7 +1,6 @@
/* Simple fixed-point linear resampler by BearOso*/
-#ifndef __LINEAR_RESAMPLER_H
-#define __LINEAR_RESAMPLER_H
+#pragma once
#include "resampler.h"
@@ -99,5 +98,3 @@
}
};
-#endif /* __LINEAR_RESAMPLER_H */
-
--- a/src/in_snsf/snes9x/apu/osculating_resampler.h
+++ b/src/in_snsf/snes9x/apu/osculating_resampler.h
@@ -1,7 +1,6 @@
/* Simple resampler based on bsnes's ruby audio library */
-#ifndef __OSCULATING_RESAMPLER_H
-#define __OSCULATING_RESAMPLER_H
+#pragma once
#include <cmath>
#include "resampler.h"
@@ -126,5 +125,3 @@
}
};
-#endif /* __OSCULATING_RESAMPLER_H */
-
--- a/src/in_snsf/snes9x/apu/resampler.h
+++ b/src/in_snsf/snes9x/apu/resampler.h
@@ -1,7 +1,6 @@
/* Simple resampler based on bsnes's ruby audio library */
-#ifndef __RESAMPLER_H
-#define __RESAMPLER_H
+#pragma once
#include "ring_buffer.h"
@@ -42,5 +41,3 @@
}
};
-#endif /* __RESAMPLER_H */
-
--- a/src/in_snsf/snes9x/apu/ring_buffer.h
+++ b/src/in_snsf/snes9x/apu/ring_buffer.h
@@ -1,7 +1,6 @@
/* Simple byte-based ring buffer. Licensed under public domain (C) BearOso. */
-#ifndef __RING_BUFFER_H
-#define __RING_BUFFER_H
+#pragma once
#include <algorithm>
#include <cstring>
@@ -70,5 +69,3 @@
}
};
-#endif
-
--- a/src/in_snsf/snes9x/apu/sinc_resampler.h
+++ b/src/in_snsf/snes9x/apu/sinc_resampler.h
@@ -1,7 +1,6 @@
/* Simple resampler based on bsnes's ruby audio library */
-#ifndef __SINC_RESAMPLER_H
-#define __SINC_RESAMPLER_H
+#pragma once
#include <algorithm>
#define _USE_MATH_DEFINES
@@ -152,5 +151,3 @@
}
};
-#endif /* __SINC_RESAMPLER_H */
-