fix compiler warnings by using proper OR operator
This commit is contained in:
parent
8cd7645561
commit
38514efa44
2 changed files with 4 additions and 4 deletions
|
@ -196,7 +196,7 @@ void render_to_file1(const mapnik::Map& map,
|
|||
const std::string& filename,
|
||||
const std::string& format)
|
||||
{
|
||||
if (format == "pdf" | format == "svg" | format =="ps" | format == "ARGB32" | format == "RGB24")
|
||||
if (format == "pdf" || format == "svg" || format =="ps" || format == "ARGB32" || format == "RGB24")
|
||||
{
|
||||
#if defined(HAVE_CAIRO)
|
||||
mapnik::save_to_cairo_file(map,filename,format);
|
||||
|
@ -215,7 +215,7 @@ void render_to_file1(const mapnik::Map& map,
|
|||
void render_to_file2(const mapnik::Map& map,const std::string& filename)
|
||||
{
|
||||
std::string format = mapnik::guess_type(filename);
|
||||
if (format == "pdf" | format == "svg" | format =="ps")
|
||||
if (format == "pdf" || format == "svg" || format =="ps")
|
||||
{
|
||||
#if defined(HAVE_CAIRO)
|
||||
mapnik::save_to_cairo_file(map,filename,format);
|
||||
|
|
|
@ -154,7 +154,7 @@ namespace mapnik
|
|||
|
||||
// TODO - expose as user option
|
||||
/*
|
||||
if (type == "ARGB32" | type == "RGB24")
|
||||
if (type == "ARGB32" || type == "RGB24")
|
||||
{
|
||||
context->set_antialias(Cairo::ANTIALIAS_NONE);
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ namespace mapnik
|
|||
mapnik::cairo_renderer<Cairo::Context> ren(map, context);
|
||||
ren.apply();
|
||||
|
||||
if (type == "ARGB32" | type == "RGB24")
|
||||
if (type == "ARGB32" || type == "RGB24")
|
||||
{
|
||||
surface->write_to_png(filename);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue