summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/input.cpp
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-07-31 11:50:20 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-07-31 14:41:02 +0200
commit9667c6a8cce1829a7321dde67bd0287c73234386 (patch)
treef3665957d557cb18728a40e75f7d9f2341aaff1d /src/emu/input.cpp
parent69ac4affc86caac51ff9720083ed128dabdb932f (diff)
std::min and std:max instead of MIN and MAX, also some more macros converted to inline functions (nw)
Diffstat (limited to 'src/emu/input.cpp')
-rw-r--r--src/emu/input.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/emu/input.cpp b/src/emu/input.cpp
index 360810a3b6c..d1a85452757 100644
--- a/src/emu/input.cpp
+++ b/src/emu/input.cpp
@@ -863,7 +863,7 @@ input_item_id input_device::add_item(const char *name, input_item_id itemid, ite
}
// assign the new slot and update the maximum
- m_maxitem = MAX(m_maxitem, itemid);
+ m_maxitem = std::max(m_maxitem, itemid);
return itemid;
}
@@ -986,7 +986,7 @@ input_device *input_class::add_device(int devindex, const char *name, void *inte
m_device[devindex] = std::make_unique<input_device>(*this, devindex, name, internal);
// update the maximum index found
- m_maxindex = MAX(m_maxindex, devindex);
+ m_maxindex = std::max(m_maxindex, devindex);
osd_printf_verbose("Input: Adding %s #%d: %s\n", (*devclass_string_table)[m_devclass], devindex, name);
return m_device[devindex].get();
@@ -2363,8 +2363,8 @@ INT32 input_device_absolute_item::read_as_absolute(input_item_modifier modifier)
// positive/negative: scale to full axis
if (modifier == ITEM_MODIFIER_POS)
- result = MAX(result, 0) * 2 + INPUT_ABSOLUTE_MIN;
+ result = std::max(result, 0) * 2 + INPUT_ABSOLUTE_MIN;
if (modifier == ITEM_MODIFIER_NEG)
- result = MAX(-result, 0) * 2 + INPUT_ABSOLUTE_MIN;
+ result = std::max(-result, 0) * 2 + INPUT_ABSOLUTE_MIN;
return result;
}