summaryrefslogtreecommitdiff
path: root/platform/default/image.cpp
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2015-03-11 17:19:16 +0200
committerThiago Marcos P. Santos <thiago@mapbox.com>2015-03-12 14:19:32 +0200
commit124b49562ddfe951ad82243b56a859a46a58bd57 (patch)
treedbee0d9b9e6432401e033637eb80bc71fa05a42a /platform/default/image.cpp
parent2b6afe6a549284a862d0231653d2183d57a5b496 (diff)
downloadqtlocation-mapboxgl-124b49562ddfe951ad82243b56a859a46a58bd57.tar.gz
Get rid of printf and cout by using Log::*
Use our logging system that will route the message accordingly on the target platform. Fixes #613
Diffstat (limited to 'platform/default/image.cpp')
-rw-r--r--platform/default/image.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/platform/default/image.cpp b/platform/default/image.cpp
index 311aa2ed72..1a10d78ffa 100644
--- a/platform/default/image.cpp
+++ b/platform/default/image.cpp
@@ -32,14 +32,14 @@ std::string compress_png(int width, int height, void *rgba) {
png_voidp error_ptr = 0;
png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, error_ptr, NULL, NULL);
if (!png_ptr) {
- Log::Error(Event::Image, "Couldn't create png_ptr");
+ Log::Error(Event::Image, "couldn't create png_ptr");
return "";
}
png_infop info_ptr = png_create_info_struct(png_ptr);
if (!png_ptr) {
png_destroy_write_struct(&png_ptr, (png_infopp)0);
- Log::Error(Event::Image, "Couldn't create info_ptr");
+ Log::Error(Event::Image, "couldn't create info_ptr");
return "";
}
@@ -87,7 +87,7 @@ Image::Image(std::string const& data)
}
catch (ImageReaderException const& ex)
{
- fprintf(stderr, "Image: %s\n", ex.what());
+ Log::Error(Event::Image, ex.what());
img.reset();
width = 0;
height = 0;
@@ -95,7 +95,7 @@ Image::Image(std::string const& data)
}
catch (...) // catch the rest
{
- fprintf(stderr, "Image: exception in constructor");
+ Log::Error(Event::Image, "exception in constructor");
img.reset();
width = 0;
height = 0;