summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Couriersud <couriersud@users.noreply.github.com>2009-10-09 22:44:05 +0000
committer Couriersud <couriersud@users.noreply.github.com>2009-10-09 22:44:05 +0000
commit5bd3f9a46b2c7fbed4094c54f065a0dfe4a6a9c7 (patch)
tree8a1df87c73774dfd87dbf90f5eccda7ec852ff49 /src
parentd74fb10af967fd5d0a4816084fa1c2aa3949a260 (diff)
Add some EXPECTED/UNEXPECTED to if statements
Diffstat (limited to 'src')
-rw-r--r--src/emu/sound/disc_mth.c18
-rw-r--r--src/emu/sound/disc_sys.c2
2 files changed, 10 insertions, 10 deletions
diff --git a/src/emu/sound/disc_mth.c b/src/emu/sound/disc_mth.c
index eb9a8b58a48..a45f24d8b97 100644
--- a/src/emu/sound/disc_mth.c
+++ b/src/emu/sound/disc_mth.c
@@ -1091,11 +1091,11 @@ static DISCRETE_STEP(dst_mixer)
double v_ref = info->vRef;
double rI = info->rI;
- if (DST_MIXER__ENABLE)
+ if (EXPECTED(DST_MIXER__ENABLE))
{
r_total = context->r_total;
- if (context->r_node_bit_flag != 0)
+ if (UNEXPECTED(context->r_node_bit_flag != 0))
{
/* loop and do any high pass filtering for connected caps */
/* but first see if there is an r_node for the current path */
@@ -1161,7 +1161,7 @@ static DISCRETE_STEP(dst_mixer)
bit_mask = bit_mask << 1;
}
}
- else if (c_bit_flag != 0)
+ else if (UNEXPECTED(c_bit_flag != 0))
{
/* no r_nodes, so just do high pass filtering */
for (bit = 0; bit < context->size; bit++)
@@ -1180,7 +1180,7 @@ static DISCRETE_STEP(dst_mixer)
else
{
/* no r_nodes or c_nodes, mixing only */
- if (type == DISC_MIXER_IS_OP_AMP)
+ if (UNEXPECTED(type == DISC_MIXER_IS_OP_AMP))
{
for (bit = 0; bit < context->size; bit++)
i += ( v_ref - DST_MIXER__IN(bit) ) / info->r[bit];
@@ -1192,7 +1192,7 @@ static DISCRETE_STEP(dst_mixer)
}
}
- if (type == DISC_MIXER_IS_OP_AMP_WITH_RI)
+ if (UNEXPECTED(type == DISC_MIXER_IS_OP_AMP_WITH_RI))
i += v_ref / rI;
r_total = 1.0 / r_total;
@@ -1201,13 +1201,13 @@ static DISCRETE_STEP(dst_mixer)
* If op-amp then summing formula is used. */
v = i * ((type == DISC_MIXER_IS_OP_AMP) ? info->rF : r_total);
- if (type == DISC_MIXER_IS_OP_AMP_WITH_RI)
+ if (UNEXPECTED(type == DISC_MIXER_IS_OP_AMP_WITH_RI))
v = v_ref + (context->gain * (v_ref - v));
/* Do the low pass filtering for cF */
- if (info->cF != 0)
+ if (EXPECTED(info->cF != 0))
{
- if (r_node_bit_flag != 0)
+ if (UNEXPECTED(r_node_bit_flag != 0))
{
/* Re-calculate exponent if resistor nodes are used */
context->exponent_c_f = RC_CHARGE_EXP(r_total * info->cF);
@@ -1217,7 +1217,7 @@ static DISCRETE_STEP(dst_mixer)
}
/* Do the high pass filtering for cAmp */
- if (info->cAmp != 0)
+ if (EXPECTED(info->cAmp != 0))
{
context->v_cap_amp += (v - context->v_cap_amp) * context->exponent_c_amp;
v -= context->v_cap_amp;
diff --git a/src/emu/sound/disc_sys.c b/src/emu/sound/disc_sys.c
index 2d9b113c322..e051c9f8ec7 100644
--- a/src/emu/sound/disc_sys.c
+++ b/src/emu/sound/disc_sys.c
@@ -137,7 +137,7 @@ static DISCRETE_STEP( dso_task_start )
const linked_list_entry *entry;
/* update source node buffer */
- for (entry = task->source_list; entry != 0; entry = entry->next)
+ for (entry = task->source_list; entry != NULL; entry = entry->next)
{
discrete_source_node *sn = (discrete_source_node *) entry->ptr;
sn->buffer = *sn->ptr++;