diff --git a/src/base/dll_unix.h b/src/base/dll_unix.h index 8ea429495..3191119fc 100644 --- a/src/base/dll_unix.h +++ b/src/base/dll_unix.h @@ -4,6 +4,7 @@ // This file is released under the terms of the MIT license. // Read LICENSE.txt for more information. +#include "base/config.h" #include "base/string.h" #ifdef HAVE_DLFCN_H diff --git a/src/base/string.cpp b/src/base/string.cpp index e265ce861..43cf3a898 100644 --- a/src/base/string.cpp +++ b/src/base/string.cpp @@ -8,7 +8,9 @@ #include "config.h" #endif +#include "base/debug.h" #include "base/string.h" + #include #include #include @@ -158,7 +160,7 @@ std::wstring from_utf8(const std::string& src) utf8_const_iterator end(src.end()); while (it != end) { - assert(buf_it != buf_end); + ASSERT(buf_it != buf_end); *buf_it = *it; ++buf_it; ++it; diff --git a/src/doc/algorithm/resize_image.cpp b/src/doc/algorithm/resize_image.cpp index 44870ec84..4751c3625 100644 --- a/src/doc/algorithm/resize_image.cpp +++ b/src/doc/algorithm/resize_image.cpp @@ -17,6 +17,8 @@ #include "doc/rgbmap.h" #include "gfx/point.h" +#include + namespace doc { namespace algorithm { @@ -31,9 +33,9 @@ void resize_image_nearest(const Image* src, Image* dst) auto dstIt = dstBits.begin(); for (int y=0; yheight(); ++y) { - py = floor(y * y_ratio); + py = std::floor(y * y_ratio); for (int x=0; xwidth(); ++x, ++dstIt) { - px = floor(x * x_ratio); + px = std::floor(x * x_ratio); *dstIt = get_pixel_fast(src, px, py); } } @@ -69,8 +71,8 @@ void resize_image(const Image* src, Image* dst, ResizeMethod method, const Palet dv = (src->height()-1) * 1.0 / (dst->height()-1); for (y=0; yheight(); ++y) { for (x=0; xwidth(); ++x) { - u_floor = (int)floor(u); - v_floor = (int)floor(v); + u_floor = (int)std::floor(u); + v_floor = (int)std::floor(v); if (u_floor > src->width()-1) { u_floor = src->width()-1; diff --git a/src/doc/documents_observer.h b/src/doc/documents_observer.h index 92593af0e..f4663c618 100644 --- a/src/doc/documents_observer.h +++ b/src/doc/documents_observer.h @@ -1,5 +1,5 @@ // Aseprite Document Library -// Copyright (c) 2001-2014 David Capello +// Copyright (c) 2001-2016 David Capello // // This file is released under the terms of the MIT license. // Read LICENSE.txt for more information. @@ -13,7 +13,7 @@ namespace doc { class CreateDocumentArgs { public: - CreateDocumentArgs() : m_doc(NULL) { } + CreateDocumentArgs() : m_doc(nullptr) { } Document* document() { return m_doc; } void setDocument(Document* doc) { m_doc = doc; } private: diff --git a/src/doc/file/gpl_file.cpp b/src/doc/file/gpl_file.cpp index 2dc742807..f19af51aa 100644 --- a/src/doc/file/gpl_file.cpp +++ b/src/doc/file/gpl_file.cpp @@ -9,6 +9,7 @@ #endif #include "base/fstream_path.h" +#include "base/log.h" #include "base/split_string.h" #include "base/trim_string.h" #include "base/unique_ptr.h" diff --git a/src/ft/face.h b/src/ft/face.h index 9612c8bc8..4436aa5d8 100644 --- a/src/ft/face.h +++ b/src/ft/face.h @@ -8,6 +8,7 @@ #define FT_FACE_H_INCLUDED #pragma once +#include "base/debug.h" #include "base/disable_copying.h" #include "base/string.h" #include "ft/freetype_headers.h" diff --git a/src/she/osx/app.mm b/src/she/osx/app.mm index 900ce804f..3156202e7 100644 --- a/src/she/osx/app.mm +++ b/src/she/osx/app.mm @@ -12,6 +12,7 @@ #include "she/osx/app.h" +#include "base/debug.h" #include "base/thread.h" #include "she/osx/app_delegate.h" diff --git a/src/she/osx/window.mm b/src/she/osx/window.mm index b5b737275..92de44367 100644 --- a/src/she/osx/window.mm +++ b/src/she/osx/window.mm @@ -10,6 +10,7 @@ #include "she/osx/window.h" +#include "base/debug.h" #include "she/event.h" #include "she/osx/event_queue.h" #include "she/osx/view.h"