Bug 923249 - Remove some prtypes use in gfx/; r=roc

This commit is contained in:
Ms2ger 2013-10-20 09:25:20 +02:00
parent f47f8f61e3
commit 9b89f4d9e2
3 changed files with 12 additions and 12 deletions

View File

@ -39,7 +39,6 @@
#include "nsRect.h" // for nsIntRect
#include "nsServiceManagerUtils.h" // for do_GetService
#include "nsString.h" // for nsString, nsAutoCString, etc
#include "prtypes.h" // for PR_INT32_MAX
#if MOZ_ANDROID_OMTC
#include "TexturePoolOGL.h"
@ -1356,7 +1355,7 @@ CompositorOGL::CopyToTarget(DrawTarget *aTarget, const gfxMatrix& aTransform)
GLint width = rect.width;
GLint height = rect.height;
if ((int64_t(width) * int64_t(height) * int64_t(4)) > PR_INT32_MAX) {
if ((int64_t(width) * int64_t(height) * int64_t(4)) > INT32_MAX) {
NS_ERROR("Widget size too big - integer overflow!");
return;
}

View File

@ -14,7 +14,6 @@
#include "nsMemory.h" // for NS_ARRAY_LENGTH
#include "nsUnicharUtils.h"
#include "nscore.h" // for PRUnichar
#include "prtypes.h" // for PR_STATIC_ASSERT
#include "mozilla/gfx/2D.h"
nsFont::nsFont(const char* aName, uint8_t aStyle, uint8_t aVariant,
@ -255,8 +254,9 @@ const gfxFontFeature eastAsianDefaults[] = {
{ TRUETYPE_TAG('r','u','b','y'), 1 }
};
PR_STATIC_ASSERT(NS_ARRAY_LENGTH(eastAsianDefaults) ==
eFeatureEastAsian_numFeatures);
static_assert(NS_ARRAY_LENGTH(eastAsianDefaults) ==
eFeatureEastAsian_numFeatures,
"eFeatureEastAsian_numFeatures should be correct");
// NS_FONT_VARIANT_LIGATURES_xxx values
const gfxFontFeature ligDefaults[] = {
@ -270,8 +270,9 @@ const gfxFontFeature ligDefaults[] = {
{ TRUETYPE_TAG('c','a','l','t'), 0 }
};
PR_STATIC_ASSERT(NS_ARRAY_LENGTH(ligDefaults) ==
eFeatureLigatures_numFeatures);
static_assert(NS_ARRAY_LENGTH(ligDefaults) ==
eFeatureLigatures_numFeatures,
"eFeatureLigatures_numFeatures should be correct");
// NS_FONT_VARIANT_NUMERIC_xxx values
const gfxFontFeature numericDefaults[] = {
@ -285,8 +286,9 @@ const gfxFontFeature numericDefaults[] = {
{ TRUETYPE_TAG('o','r','d','n'), 1 }
};
PR_STATIC_ASSERT(NS_ARRAY_LENGTH(numericDefaults) ==
eFeatureNumeric_numFeatures);
static_assert(NS_ARRAY_LENGTH(numericDefaults) ==
eFeatureNumeric_numFeatures,
"eFeatureNumeric_numFeatures should be correct");
static void
AddFontFeaturesBitmask(uint32_t aValue, uint32_t aMin, uint32_t aMax,

View File

@ -7,11 +7,10 @@
#include "mozilla/gfx/Types.h" // for NS_SIDE_BOTTOM, etc
#include "nsDeviceContext.h" // for nsDeviceContext
#include "nsString.h" // for nsAutoString, etc
#include "prtypes.h" // for PR_STATIC_ASSERT
#include "nsMargin.h" // for nsMargin
// the mozilla::css::Side sequence must match the nsMargin nscoord sequence
PR_STATIC_ASSERT((NS_SIDE_TOP == 0) && (NS_SIDE_RIGHT == 1) && (NS_SIDE_BOTTOM == 2) && (NS_SIDE_LEFT == 3));
static_assert((NS_SIDE_TOP == 0) && (NS_SIDE_RIGHT == 1) && (NS_SIDE_BOTTOM == 2) && (NS_SIDE_LEFT == 3),
"The mozilla::css::Side sequence must match the nsMargin nscoord sequence");
#ifdef DEBUG
// Diagnostics