mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 782416 - Make gfx::2d's nullptr definition actually work. r=nrc
--HG-- extra : rebase_source : da098e5e6d04aa1dce2ffefd4ccd0ad6ffb376b8
This commit is contained in:
parent
3966995e74
commit
db420cfa05
18
gfx/2d/2D.h
18
gfx/2d/2D.h
@ -6,6 +6,7 @@
|
||||
#ifndef _MOZILLA_GFX_2D_H
|
||||
#define _MOZILLA_GFX_2D_H
|
||||
|
||||
#include "Types.h"
|
||||
#include "Point.h"
|
||||
#include "Rect.h"
|
||||
#include "Matrix.h"
|
||||
@ -19,23 +20,6 @@
|
||||
#include <string>
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Use C++11 nullptr if available; otherwise use a C++ typesafe template; and
|
||||
* for C, fall back to longs. See bugs 547964 and 626472.
|
||||
* Copy and paste job from nscore.h, see bug 781943
|
||||
*/
|
||||
#if defined(MOZ_GFX) && !defined(HAVE_NULLPTR)
|
||||
#ifndef __cplusplus
|
||||
# define nullptr ((void*)0)
|
||||
#elif defined(__GNUC__)
|
||||
# define nullptr __null
|
||||
#elif defined(_WIN64)
|
||||
# define nullptr 0LL
|
||||
#else
|
||||
# define nullptr 0L
|
||||
#endif
|
||||
#endif /* defined(MOZ_GFX) && !defined(HAVE_NULLPTR) */
|
||||
|
||||
struct _cairo_surface;
|
||||
typedef _cairo_surface cairo_surface_t;
|
||||
|
||||
|
@ -6,6 +6,23 @@
|
||||
#ifndef MOZILLA_GFX_TYPES_H_
|
||||
#define MOZILLA_GFX_TYPES_H_
|
||||
|
||||
/**
|
||||
* Use C++11 nullptr if available; otherwise use a C++ typesafe template; and
|
||||
* for C, fall back to longs. See bugs 547964 and 626472.
|
||||
* Copy and paste job from nscore.h, see bug 781943
|
||||
*/
|
||||
#if defined(MOZ_GFX) && !defined(HAVE_NULLPTR)
|
||||
#ifndef __cplusplus
|
||||
# define nullptr ((void*)0)
|
||||
#elif defined(__GNUC__)
|
||||
# define nullptr __null
|
||||
#elif defined(_WIN64)
|
||||
# define nullptr 0LL
|
||||
#else
|
||||
# define nullptr 0L
|
||||
#endif
|
||||
#endif /* defined(MOZ_GFX) && !defined(HAVE_NULLPTR) */
|
||||
|
||||
#include "mozilla/StandardInteger.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
@ -7,6 +7,7 @@
|
||||
#define MOZILLA_GFX_USERDATA_H_
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "Types.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
Loading…
Reference in New Issue
Block a user