Skip to content

Commit

Permalink
util/coretmpl.h: Added constexpr to the bitswap with explicit count.
Browse files Browse the repository at this point in the history
This was a hangover from poor implementation of constexpr in older compilers.
  • Loading branch information
cuavas committed Jan 7, 2025
1 parent 4aca01d commit 44284c5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/util/coretmpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ template <typename T, typename U, typename... V> 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 <unsigned B, typename T, typename... U> T bitswap(T val, U... b) noexcept
template <unsigned B, typename T, typename... U> constexpr T bitswap(T val, U... b) noexcept
{
static_assert(sizeof...(b) == B, "wrong number of bits");
static_assert((sizeof(std::remove_reference_t<T>) * 8) >= B, "return type too small for result");
Expand Down
11 changes: 10 additions & 1 deletion src/mame/gaelco/gaelco2.h
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -180,3 +187,5 @@ class wrally2_state : public gaelco2_state

u8 m_analog_ports[2]{};
};

#endif // MAME_GAELCO_GAELCO2_H

0 comments on commit 44284c5

Please sign in to comment.