From 44284c5eaa5245e71f91825d57e1b634e193b717 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Wed, 8 Jan 2025 05:11:17 +1100 Subject: util/coretmpl.h: Added constexpr to the bitswap with explicit count. This was a hangover from poor implementation of constexpr in older compilers. --- src/lib/util/coretmpl.h | 2 +- src/mame/gaelco/gaelco2.h | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/lib/util/coretmpl.h b/src/lib/util/coretmpl.h index 55313a4a0f5..87f8cfbf09e 100644 --- a/src/lib/util/coretmpl.h +++ b/src/lib/util/coretmpl.h @@ -654,7 +654,7 @@ template constexpr T bitswap(T val, U b, /// bit of the input. Specify bits in the order they should appear in /// the output field, from most significant to least significant. /// \return The extracted bits packed into a right-aligned field. -template T bitswap(T val, U... b) noexcept +template constexpr T bitswap(T val, U... b) noexcept { static_assert(sizeof...(b) == B, "wrong number of bits"); static_assert((sizeof(std::remove_reference_t) * 8) >= B, "return type too small for result"); diff --git a/src/mame/gaelco/gaelco2.h b/src/mame/gaelco/gaelco2.h index cf36de82b3c..7cb21cbba03 100644 --- a/src/mame/gaelco/gaelco2.h +++ b/src/mame/gaelco/gaelco2.h @@ -1,13 +1,20 @@ // license:BSD-3-Clause // copyright-holders:Manuel Abadia, David Haywood +#ifndef MAME_GAELCO_GAELCO2_H +#define MAME_GAELCO_GAELCO2_H + +#pragma once + #include "cpu/m68000/m68000.h" -#include "video/bufsprite.h" #include "machine/74259.h" #include "machine/eepromser.h" #include "machine/timer.h" +#include "video/bufsprite.h" + #include "emupal.h" #include "tilemap.h" + class gaelco2_state : public driver_device { public: @@ -180,3 +187,5 @@ private: u8 m_analog_ports[2]{}; }; + +#endif // MAME_GAELCO_GAELCO2_H -- cgit v1.2.3