summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/timekpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/timekpr.cpp')
-rw-r--r--src/devices/machine/timekpr.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/devices/machine/timekpr.cpp b/src/devices/machine/timekpr.cpp
index 66c83ab2046..614f071ade7 100644
--- a/src/devices/machine/timekpr.cpp
+++ b/src/devices/machine/timekpr.cpp
@@ -69,21 +69,15 @@ DEFINE_DEVICE_TYPE(MK48T12, mk48t12_device, "mk48t12", "MK48T12 Timekeeper")
INLINE FUNCTIONS
***************************************************************************/
-static void counter_to_ram(u8 *data, u32 offset, u8 counter)
+inline void counter_to_ram(u8 *data, s32 offset, u8 counter)
{
if (offset >= 0)
- {
data[offset] = counter;
- }
}
-static int counter_from_ram(u8 *data, u32 offset)
+inline int counter_from_ram(u8 const *data, s32 offset, u8 unmap = 0)
{
- if (offset >= 0)
- {
- return data[offset];
- }
- return 0;
+ return (offset >= 0) ? data[offset] : unmap;
}
//**************************************************************************