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 // 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 // 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 // it under the terms of the GNU General Public License version 2 as
@ -9,6 +9,8 @@
#define APP_CONTEXT_FLAGS_H_INCLUDED #define APP_CONTEXT_FLAGS_H_INCLUDED
#pragma once #pragma once
#include "base/ints.h"
namespace doc { namespace doc {
class Site; class Site;
} }

View File

@ -1,5 +1,5 @@
// Aseprite Base Library // 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. // This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information. // Read LICENSE.txt for more information.
@ -12,10 +12,6 @@
#include <math.h> #include <math.h>
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#undef NULL #undef NULL
#ifdef __cplusplus #ifdef __cplusplus
#define NULL nullptr #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 // 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. // This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information. // Read LICENSE.txt for more information.
@ -8,6 +8,8 @@
#define BASE_PROCESS_H_INCLUDED #define BASE_PROCESS_H_INCLUDED
#pragma once #pragma once
#include "base/ints.h"
namespace base { namespace base {
typedef uint32_t pid; typedef uint32_t pid;

View File

@ -1,5 +1,5 @@
// Aseprite Base Library // 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. // This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information. // Read LICENSE.txt for more information.
@ -8,6 +8,7 @@
#define BASE_SERIALIZATION_H_INCLUDED #define BASE_SERIALIZATION_H_INCLUDED
#pragma once #pragma once
#include "base/ints.h"
#include <iosfwd> #include <iosfwd>
namespace base { namespace base {

View File

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

View File

@ -1,5 +1,5 @@
// Aseprite Document Library // 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. // This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information. // Read LICENSE.txt for more information.
@ -8,6 +8,8 @@
#define DOC_COLOR_H_INCLUDED #define DOC_COLOR_H_INCLUDED
#pragma once #pragma once
#include "base/ints.h"
namespace doc { namespace doc {
// The greatest int type to storage a color for an image in the // The greatest int type to storage a color for an image in the

View File

@ -1,5 +1,5 @@
// Aseprite Document Library // 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. // This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information. // Read LICENSE.txt for more information.
@ -8,6 +8,8 @@
#define DOC_OBJECT_ID_H_INCLUDED #define DOC_OBJECT_ID_H_INCLUDED
#pragma once #pragma once
#include "base/ints.h"
namespace doc { namespace doc {
typedef uint32_t ObjectId; typedef uint32_t ObjectId;

View File

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

View File

@ -1,5 +1,5 @@
// Aseprite Gfx Library // 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. // This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information. // Read LICENSE.txt for more information.
@ -8,6 +8,8 @@
#define GFX_COLOR_H_INCLUDED #define GFX_COLOR_H_INCLUDED
#pragma once #pragma once
#include "base/ints.h"
namespace gfx { namespace gfx {
typedef uint32_t Color; typedef uint32_t Color;