Commit 661ffc73 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Fix some trivial compilation warnings

parent 2ffa62b1
......@@ -31,12 +31,12 @@ struct get_complete
template <class Graph>
void operator()(Graph& g, size_t N, bool directed, bool self_loops) const
{
for (int i = 0; i < N; ++i)
for (size_t i = 0; i < N; ++i)
add_vertex(g);
for (int i = 0; i < N; ++i)
for (size_t i = 0; i < N; ++i)
{
for (int j = directed ? 0 : i; j < N; ++j)
for (size_t j = directed ? 0 : i; j < N; ++j)
{
if (!self_loops && j == i)
continue;
......@@ -53,12 +53,12 @@ struct get_circular
void operator()(Graph& g, size_t N, size_t k, bool directed,
bool self_loops) const
{
for (int i = 0; i < N; ++i)
for (size_t i = 0; i < N; ++i)
add_vertex(g);
for (int i = 0; i < N; ++i)
for (size_t i = 0; i < N; ++i)
{
for (int j = i; j < i + k + 1; ++j)
for (size_t j = i; j < i + k + 1; ++j)
{
if (!self_loops && j == i)
continue;
......
......@@ -99,7 +99,7 @@ struct do_get_radial
vertex_t w = target(*e, g);
new_layer.push_back(w);
if (layers.size() - 1 == level[w])
if (int(layers.size()) - 1 == level[w])
last = false;
}
if (out_degree(v, g) == 0)
......
......@@ -154,7 +154,7 @@ public:
const StrideList& strides)
:base_t(data, sizes)
{
for (int i = 0; i < dim; ++i)
for (size_t i = 0; i < dim; ++i)
base_t::stride_list_[i] = strides[i];
}
};
......@@ -191,7 +191,7 @@ boost::multi_array_ref<ValueType,dim> get_array(boost::python::object points)
}
vector<size_t> shape(dim);
for (int i = 0; i < dim; ++i)
for (size_t i = 0; i < dim; ++i)
shape[i] = PyArray_DIMS(pa)[i];
vector<size_t> stride(dim);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment