Fix compilation errors when HAVE_CONFIG_H isn't defined

This commit is contained in:
David Capello 2016-09-26 09:07:11 -03:00
parent f0fb945672
commit 7fb984b18d
8 changed files with 16 additions and 7 deletions

View File

@ -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

View File

@ -8,7 +8,9 @@
#include "config.h"
#endif
#include "base/debug.h"
#include "base/string.h"
#include <cassert>
#include <cctype>
#include <vector>
@ -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;

View File

@ -17,6 +17,8 @@
#include "doc/rgbmap.h"
#include "gfx/point.h"
#include <cmath>
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; y<dst->height(); ++y) {
py = floor(y * y_ratio);
py = std::floor(y * y_ratio);
for (int x=0; x<dst->width(); ++x, ++dstIt) {
px = floor(x * x_ratio);
px = std::floor(x * x_ratio);
*dstIt = get_pixel_fast<ImageTraits>(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; y<dst->height(); ++y) {
for (x=0; x<dst->width(); ++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;

View File

@ -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:

View File

@ -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"

View File

@ -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"

View File

@ -12,6 +12,7 @@
#include "she/osx/app.h"
#include "base/debug.h"
#include "base/thread.h"
#include "she/osx/app_delegate.h"

View File

@ -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"