aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2017-04-02 07:51:50 +0300
committerOrgad Shaneh <orgads@gmail.com>2017-04-03 10:56:19 +0000
commit967f2262591556bdc72bcbb3339754ca8dd96203 (patch)
treed8c5a3ceb8aa6d446c6fa42ff488e581d6ef374d
parent5b43d40fbf3758e8a388f4d54e04071751e32f5b (diff)
Fix size_t -> int conversion warnings on MSVC (64bit)
Change-Id: I410e531fa3cebffb282350904a4caa3e5002fce2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--src/lib/corelib/buildgraph/rulegraph.cpp2
-rw-r--r--src/lib/corelib/tools/persistence.h2
-rw-r--r--src/lib/corelib/tools/set.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/corelib/buildgraph/rulegraph.cpp b/src/lib/corelib/buildgraph/rulegraph.cpp
index 9388ff3a4..50b520e19 100644
--- a/src/lib/corelib/buildgraph/rulegraph.cpp
+++ b/src/lib/corelib/buildgraph/rulegraph.cpp
@@ -122,7 +122,7 @@ void RuleGraph::dump_impl(QByteArray &indent, int rootIndex) const
int RuleGraph::insert(const RulePtr &rule)
{
- rule->ruleGraphId = m_rules.size();
+ rule->ruleGraphId = int(m_rules.size());
m_rules.push_back(rule);
return rule->ruleGraphId;
}
diff --git a/src/lib/corelib/tools/persistence.h b/src/lib/corelib/tools/persistence.h
index 8efd5431d..c94c1b963 100644
--- a/src/lib/corelib/tools/persistence.h
+++ b/src/lib/corelib/tools/persistence.h
@@ -289,7 +289,7 @@ struct PersistentPool::Helper<T, typename std::enable_if<IsSimpleContainer<T>::v
{
static void store(const T &container, PersistentPool *pool)
{
- pool->store<int>(container.size());
+ pool->store(int(container.size()));
for (auto it = container.cbegin(); it != container.cend(); ++it)
pool->store(*it);
}
diff --git a/src/lib/corelib/tools/set.h b/src/lib/corelib/tools/set.h
index 2229ebd4b..3f4f1c359 100644
--- a/src/lib/corelib/tools/set.h
+++ b/src/lib/corelib/tools/set.h
@@ -119,7 +119,7 @@ public:
bool contains(const T &v) const { return std::binary_search(cbegin(), cend(), v); }
bool contains(const Set<T> &other) const;
bool isEmpty() const { return m_data.empty(); }
- int count() const { return m_data.size(); }
+ int count() const { return int(m_data.size()); }
int size() const { return count(); }
int capacity() const { return m_data.capacity(); }
bool intersects(const Set<T> &other) const;