Move stdints to base/ints.h file

This commit is contained in:
David Capello 2016-03-03 19:20:00 -03:00
parent 5f97e66a8b
commit 9a7ffab5a0
10 changed files with 40 additions and 12 deletions

View File

@ -1,5 +1,5 @@
// Aseprite
// Copyright (C) 2001-2015 David Capello
// Copyright (C) 2001-2016 David Capello
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@ -9,6 +9,8 @@
#define APP_CONTEXT_FLAGS_H_INCLUDED
#pragma once
#include "base/ints.h"
namespace doc {
class Site;
}

View File

@ -1,5 +1,5 @@
// Aseprite Base Library
// Copyright (c) 2001-2015 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.
@ -12,10 +12,6 @@
#include <math.h>
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#undef NULL
#ifdef __cplusplus
#define NULL nullptr

19
src/base/ints.h Normal file
View File

@ -0,0 +1,19 @@
// Aseprite Base Library
// Copyright (c) 2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef BASE_INTS_H_INCLUDED
#define BASE_INTS_H_INCLUDED
#pragma once
#include "base/config.h"
#ifdef HAVE_STDINT_H
#include <stdint.h>
#else
#error uint8_t, uint32_t, etc. definitions are missing
#endif
#endif

View File

@ -1,5 +1,5 @@
// Aseprite Base Library
// Copyright (c) 2015 David Capello
// Copyright (c) 2015-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
@ -8,6 +8,8 @@
#define BASE_PROCESS_H_INCLUDED
#pragma once
#include "base/ints.h"
namespace base {
typedef uint32_t pid;

View File

@ -1,5 +1,5 @@
// Aseprite Base Library
// Copyright (c) 2001-2013 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.
@ -8,6 +8,7 @@
#define BASE_SERIALIZATION_H_INCLUDED
#pragma once
#include "base/ints.h"
#include <iosfwd>
namespace base {

View File

@ -32,7 +32,8 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "sha1_rfc3174.h"
#include "base/ints.h"
#include "base/sha1_rfc3174.h"
/*
* Define the SHA1 circular left shift macro

View File

@ -1,5 +1,5 @@
// Aseprite Document Library
// Copyright (c) 2001-2015 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.
@ -8,6 +8,8 @@
#define DOC_COLOR_H_INCLUDED
#pragma once
#include "base/ints.h"
namespace doc {
// The greatest int type to storage a color for an image in the

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.
@ -8,6 +8,8 @@
#define DOC_OBJECT_ID_H_INCLUDED
#pragma once
#include "base/ints.h"
namespace doc {
typedef uint32_t ObjectId;

View File

@ -6,6 +6,7 @@
#ifndef FIXMATH_FIXMATH_H
#define FIXMATH_FIXMATH_H
#include "base/ints.h"
#include <cerrno>
namespace fixmath {

View File

@ -1,5 +1,5 @@
// Aseprite Gfx Library
// Copyright (C) 2001-2015 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.
@ -8,6 +8,8 @@
#define GFX_COLOR_H_INCLUDED
#pragma once
#include "base/ints.h"
namespace gfx {
typedef uint32_t Color;