remove uneeded asserts in png_io
This commit is contained in:
parent
ecbba52bc0
commit
d577b0814b
1 changed files with 0 additions and 6 deletions
|
@ -36,9 +36,6 @@
|
||||||
// boost
|
// boost
|
||||||
#include <boost/scoped_array.hpp>
|
#include <boost/scoped_array.hpp>
|
||||||
|
|
||||||
// stl
|
|
||||||
#include <cassert>
|
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
#include <png.h>
|
#include <png.h>
|
||||||
|
@ -542,11 +539,9 @@ void save_as_png8_oct(T1 & file,
|
||||||
std::vector<rgb> pal;
|
std::vector<rgb> pal;
|
||||||
trees[j].setOffset( static_cast<unsigned>(palette.size()));
|
trees[j].setOffset( static_cast<unsigned>(palette.size()));
|
||||||
trees[j].create_palette(pal);
|
trees[j].create_palette(pal);
|
||||||
assert(pal.size() <= opts.colors);
|
|
||||||
leftovers = cols[j] - static_cast<unsigned>(pal.size());
|
leftovers = cols[j] - static_cast<unsigned>(pal.size());
|
||||||
cols[j] = static_cast<unsigned>(pal.size());
|
cols[j] = static_cast<unsigned>(pal.size());
|
||||||
palette.insert(palette.begin(), pal.begin(), pal.end());
|
palette.insert(palette.begin(), pal.begin(), pal.end());
|
||||||
assert(palette.size() <= 256);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -684,7 +679,6 @@ void save_as_png8_hex(T1 & file,
|
||||||
//transparency values per palette index
|
//transparency values per palette index
|
||||||
std::vector<mapnik::rgba> pal;
|
std::vector<mapnik::rgba> pal;
|
||||||
tree.create_palette(pal);
|
tree.create_palette(pal);
|
||||||
assert(int(pal.size()) <= opts.colors);
|
|
||||||
std::vector<mapnik::rgb> palette;
|
std::vector<mapnik::rgb> palette;
|
||||||
std::vector<unsigned> alphaTable;
|
std::vector<unsigned> alphaTable;
|
||||||
for(unsigned i=0; i<pal.size(); i++)
|
for(unsigned i=0; i<pal.size(); i++)
|
||||||
|
|
Loading…
Reference in a new issue