summaryrefslogtreecommitdiff
path: root/src/squelch
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2015-02-23 09:11:56 +0100
committerBardur Arantsson <bardur@scientician.net>2015-02-23 09:11:56 +0100
commit61e8cfc1d553b2bc0cce6b0dd56b03f51f187423 (patch)
tree4988afbe6ad84804444d0dc3151d300e22d1a80e /src/squelch
parentb1f5178bdabafde20eb65df6256b53dc5968b2e2 (diff)
Clean up warnings about signed/unsigned comparisons
Diffstat (limited to 'src/squelch')
-rw-r--r--src/squelch/automatizer.cc6
-rw-r--r--src/squelch/condition_metadata.cc2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/squelch/automatizer.cc b/src/squelch/automatizer.cc
index 0c0f571a..b05a253f 100644
--- a/src/squelch/automatizer.cc
+++ b/src/squelch/automatizer.cc
@@ -231,9 +231,11 @@ void Automatizer::select_rule(int selected_rule)
// Adjust selection to conform to bounds.
{
+ int rules_size = m_rules.size(); // Convert to int to avoid warnings
+
if (m_selected_rule < 0)
{
- m_selected_rule = m_rules.size() - 1;
+ m_selected_rule = rules_size - 1;
m_begin = m_selected_rule - hgt + 3;
if (m_begin < 0)
{
@@ -246,7 +248,7 @@ void Automatizer::select_rule(int selected_rule)
m_begin = m_selected_rule;
}
- if (m_selected_rule >= m_rules.size())
+ if (m_selected_rule >= rules_size)
{
m_selected_rule = 0;
m_begin = 0;
diff --git a/src/squelch/condition_metadata.cc b/src/squelch/condition_metadata.cc
index 766d44aa..273d3092 100644
--- a/src/squelch/condition_metadata.cc
+++ b/src/squelch/condition_metadata.cc
@@ -431,7 +431,7 @@ std::shared_ptr<Condition> new_condition_interactive()
else if (c == '2')
{
sel++;
- if (sel >= condition_types.size())
+ if (sel >= static_cast<int>(condition_types.size()))
{
sel = 0;
begin = 0;