Reverting part of changes from previous commits as described in mail on list (nw)

This commit is contained in:
Miodrag Milanovic 2016-10-23 09:11:47 +02:00
parent 30e830da61
commit aa2e6f9df3
11 changed files with 28 additions and 28 deletions

View file

@ -454,12 +454,12 @@ uint8_t device_serial_interface::transmit_register_get_data_bit()
bool device_serial_interface::is_receive_register_full()
{
return (m_rcv_flags & RECEIVE_REGISTER_FULL) != 0;
return m_rcv_flags & RECEIVE_REGISTER_FULL;
}
bool device_serial_interface::is_transmit_register_empty()
{
return (m_tra_flags & TRANSMIT_REGISTER_EMPTY) != 0;
return m_tra_flags & TRANSMIT_REGISTER_EMPTY;
}
const char *device_serial_interface::parity_tostring(parity_t parity)

View file

@ -109,7 +109,7 @@ protected:
bool is_receive_register_full();
bool is_transmit_register_empty();
bool is_receive_register_synchronized() const { return (m_rcv_flags & RECEIVE_REGISTER_SYNCHRONISED) != 0; }
bool is_receive_register_synchronized() const { return m_rcv_flags & RECEIVE_REGISTER_SYNCHRONISED; }
bool is_receive_register_shifting() const { return m_rcv_bit_count_received > 0; }
bool is_receive_framing_error() const { return m_rcv_framing_error; }
bool is_receive_parity_error() const { return m_rcv_parity_error; }

View file

@ -63,7 +63,7 @@ public:
void *dataptr() const { return m_dataptr.v; }
const char *symbol() const { return m_symbol.c_str(); }
bool visible() const { return ((m_flags & DSF_NOSHOW) == 0); }
bool divider() const { return ((m_flags & DSF_DIVIDER) != 0); }
bool divider() const { return m_flags & DSF_DIVIDER; }
device_state_interface *parent_state() const {return m_device_state;}
protected:

View file

@ -2516,7 +2516,7 @@ bool ioport_manager::playback_read<bool>(bool &result)
{
uint8_t temp;
playback_read(temp);
return result = temp != 0;
return result = bool(temp);
}

View file

@ -967,7 +967,7 @@ render_target::render_target(render_manager &manager, const internal_layout *lay
m_layerconfig = m_base_layerconfig;
// load the layout files
load_layout_files(layoutfile, (flags & RENDER_CREATE_SINGLE_FILE) != 0);
load_layout_files(layoutfile, flags & RENDER_CREATE_SINGLE_FILE);
// set the current view to the first one
set_view(0);
@ -1219,7 +1219,7 @@ void render_target::compute_visible_area(int32_t target_width, int32_t target_he
int scale_mode = m_scale_mode;
if (m_scale_mode == SCALE_FRACTIONAL_AUTO)
{
bool is_rotated = ((m_manager.machine().system().flags & ORIENTATION_SWAP_XY) ^ (target_orientation & ORIENTATION_SWAP_XY)) != 0;
bool is_rotated = (m_manager.machine().system().flags & ORIENTATION_SWAP_XY) ^ (target_orientation & ORIENTATION_SWAP_XY);
scale_mode = is_rotated ^ target_is_portrait ? SCALE_FRACTIONAL_Y : SCALE_FRACTIONAL_X;
}
@ -2235,27 +2235,27 @@ void render_target::config_load(xml_data_node &targetnode)
// modify the artwork config
int tmpint = xml_get_attribute_int(&targetnode, "backdrops", -1);
if (tmpint == 0 || tmpint == 1)
set_backdrops_enabled(tmpint != 0);
set_backdrops_enabled(tmpint);
tmpint = xml_get_attribute_int(&targetnode, "overlays", -1);
if (tmpint == 0 || tmpint == 1)
set_overlays_enabled(tmpint != 0);
set_overlays_enabled(tmpint);
tmpint = xml_get_attribute_int(&targetnode, "bezels", -1);
if (tmpint == 0 || tmpint == 1)
set_bezels_enabled(tmpint != 0);
set_bezels_enabled(tmpint);
tmpint = xml_get_attribute_int(&targetnode, "cpanels", -1);
if (tmpint == 0 || tmpint == 1)
set_cpanels_enabled(tmpint != 0);
set_cpanels_enabled(tmpint);
tmpint = xml_get_attribute_int(&targetnode, "marquees", -1);
if (tmpint == 0 || tmpint == 1)
set_marquees_enabled(tmpint != 0);
set_marquees_enabled(tmpint);
tmpint = xml_get_attribute_int(&targetnode, "zoom", -1);
if (tmpint == 0 || tmpint == 1)
set_zoom_to_screen(tmpint != 0);
set_zoom_to_screen(tmpint);
// apply orientation
tmpint = xml_get_attribute_int(&targetnode, "rotate", -1);

View file

@ -246,7 +246,7 @@ void screen_device_svg_renderer::output_change(const char *outname, int32_t valu
auto l = m_key_ids.find(outname);
if (l == m_key_ids.end())
return;
m_key_state[l->second] = value != 0;
m_key_state[l->second] = value;
}
void screen_device_svg_renderer::compute_initial_bboxes(std::vector<bbox> &bboxes)

View file

@ -1060,7 +1060,7 @@ void sound_manager::update(void *ptr, int param)
// force all the speaker streams to generate the proper number of samples
int samples_this_update = 0;
for (speaker_device &speaker : speaker_device_iterator(machine().root_device()))
speaker.mix(&m_leftmix[0], &m_rightmix[0], samples_this_update, (m_muted & MUTE_REASON_SYSTEM) != 0);
speaker.mix(&m_leftmix[0], &m_rightmix[0], samples_this_update, (m_muted & MUTE_REASON_SYSTEM));
// now downmix the final result
uint32_t finalmix_step = machine().video().speed_factor();

View file

@ -355,7 +355,7 @@ bool flac_decoder::reset()
&flac_decoder::metadata_callback_static,
&flac_decoder::error_callback_static, this) != FLAC__STREAM_DECODER_INIT_STATUS_OK)
return false;
return FLAC__stream_decoder_process_until_end_of_metadata(m_decoder) != 0;
return FLAC__stream_decoder_process_until_end_of_metadata(m_decoder);
}

View file

@ -86,7 +86,7 @@ public:
uint32_t flags() const { return m_flags; }
bool is_header() const { return type() == OPTION_HEADER; }
bool is_command() const { return type() == OPTION_COMMAND; }
bool is_internal() const { return (m_flags & OPTION_FLAG_INTERNAL) != 0; }
bool is_internal() const { return m_flags & OPTION_FLAG_INTERNAL; }
bool has_range() const { return (!m_minimum.empty() && !m_maximum.empty()); }
int priority() const { return m_priority; }
bool is_changed() const { return m_changed; }

View file

@ -620,16 +620,16 @@ class general_flag_reader
public:
general_flag_reader(std::uint16_t val) : m_value(val) { }
bool encrypted() const { return (m_value & 0x0001) != 0; }
bool implode_8k_dict() const { return (m_value & 0x0002) != 0; }
bool implode_3_trees() const { return (m_value & 0x0004) != 0; }
bool encrypted() const { return bool(m_value & 0x0001); }
bool implode_8k_dict() const { return bool(m_value & 0x0002); }
bool implode_3_trees() const { return bool(m_value & 0x0004); }
unsigned deflate_option() const { return unsigned((m_value >> 1) & 0x0003); }
bool lzma_eos_mark() const { return (m_value & 0x0002) != 0; }
bool use_descriptor() const { return (m_value & 0x0008) != 0; }
bool patch_data() const { return (m_value & 0x0020) != 0; }
bool strong_encryption() const { return (m_value & 0x0040) != 0; }
bool utf8_encoding() const { return (m_value & 0x0800) != 0; }
bool directory_encryption() const { return (m_value & 0x2000) != 0; }
bool lzma_eos_mark() const { return bool(m_value & 0x0002); }
bool use_descriptor() const { return bool(m_value & 0x0008); }
bool patch_data() const { return bool(m_value & 0x0020); }
bool strong_encryption() const { return bool(m_value & 0x0040); }
bool utf8_encoding() const { return bool(m_value & 0x0800); }
bool directory_encryption() const { return bool(m_value & 0x2000); }
private:
std::uint16_t m_value;

View file

@ -148,8 +148,8 @@ public:
protected:
virtual pos_type seekoff(off_type off, std::ios_base::seekdir dir, std::ios_base::openmode which = std::ios_base::in | std::ios_base::out) override
{
bool const in((which & std::ios_base::in) != 0);
bool const out((which & std::ios_base::out) != 0);
bool const in(which & std::ios_base::in);
bool const out(which & std::ios_base::out);
if ((!in && !out) ||
(in && out && (std::ios_base::cur == dir)) ||
(in && !(m_mode & std::ios_base::in)) ||