summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2012-08-24 22:51:19 +0200
committerAmit Pundir <amit.pundir@linaro.org>2013-07-25 05:15:29 +0530
commit755760e0237ce319bbaa3a79b2e9d69c58dedb86 (patch)
tree66da1bf77e224de7b344cf56eea3a7974f068c9c
parent2fec4ff3dd57cda25cbcb9a009a745dd49173c0a (diff)
downloadwebkit-linaro_android_4.3.1.tar.gz
webkit: Fix build in ISO C++ 11 modelinaro_android_4.3.1linaro_android_4.3
Change-Id: I32b3121ae46678f847dcd74ea74484aaf8f34eaf Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
-rw-r--r--Source/JavaScriptCore/wtf/NullPtr.h5
-rw-r--r--Source/WebCore/platform/graphics/android/layers/LayerAndroid.h6
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/SurfaceBacking.h6
-rw-r--r--Source/WebCore/platform/sql/SQLiteFileSystem.cpp4
4 files changed, 16 insertions, 5 deletions
diff --git a/Source/JavaScriptCore/wtf/NullPtr.h b/Source/JavaScriptCore/wtf/NullPtr.h
index 08ece565d..eaf86a7d6 100644
--- a/Source/JavaScriptCore/wtf/NullPtr.h
+++ b/Source/JavaScriptCore/wtf/NullPtr.h
@@ -35,10 +35,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define __has_feature(feature) 0
#endif
-#if __has_feature(cxx_nullptr) || (defined(_MSC_VER) && _MSC_VER >= 1600)
+#if __has_feature(cxx_nullptr) || (defined(_MSC_VER) && _MSC_VER >= 1600) || defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
#define HAVE_NULLPTR 1
+namespace std {
+ typedef decltype(nullptr) nullptr_t; // nullptr_t seems to be missing in gcc 4.7
+}
#else
namespace std {
diff --git a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.h b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.h
index dc844b39e..f740c0b92 100644
--- a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.h
+++ b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.h
@@ -17,6 +17,10 @@
#ifndef LayerAndroid_h
#define LayerAndroid_h
+#if __cplusplus < 201103L && !defined(__GXX_EXPERIMENTAL_CXX0X__) && !defined(char16_t)
+#define constexpr const
+#endif
+
#if USE(ACCELERATED_COMPOSITING)
#include "FloatPoint.h"
@@ -382,7 +386,7 @@ private:
float m_scale;
// We try to not always compute the texture size, as this is quite heavy
- static const double s_computeTextureDelay = 0.2; // 200 ms
+ static constexpr double s_computeTextureDelay = 0.2; // 200 ms
double m_lastComputeTextureSize;
RenderLayer* m_owningLayer;
diff --git a/Source/WebCore/platform/graphics/android/rendering/SurfaceBacking.h b/Source/WebCore/platform/graphics/android/rendering/SurfaceBacking.h
index ff866bfae..1f0bda6a3 100644
--- a/Source/WebCore/platform/graphics/android/rendering/SurfaceBacking.h
+++ b/Source/WebCore/platform/graphics/android/rendering/SurfaceBacking.h
@@ -29,6 +29,10 @@
#include "SkRefCnt.h"
#include "TileGrid.h"
+#if __cplusplus < 201103L && !defined(__GXX_EXPERIMENTAL_CXX0X__) && !defined(char16_t)
+#define constexpr const
+#endif
+
namespace WebCore {
class LayerAndroid;
@@ -85,7 +89,7 @@ private:
void swapTileGrids();
// Delay before we schedule a new tile at the new scale factor
- static const double s_zoomUpdateDelay = 0.1; // 100 ms
+ static constexpr double s_zoomUpdateDelay = 0.1; // 100 ms
TileGrid* m_frontTileGrid;
TileGrid* m_backTileGrid;
diff --git a/Source/WebCore/platform/sql/SQLiteFileSystem.cpp b/Source/WebCore/platform/sql/SQLiteFileSystem.cpp
index 362005c66..c4ca6aa5e 100644
--- a/Source/WebCore/platform/sql/SQLiteFileSystem.cpp
+++ b/Source/WebCore/platform/sql/SQLiteFileSystem.cpp
@@ -77,10 +77,10 @@ String SQLiteFileSystem::getFileNameForNewDatabase(const String& dbDir, const St
String fileName;
do {
++seq;
- fileName = pathByAppendingComponent(dbDir, String::format("%016"PRIx64".db", seq));
+ fileName = pathByAppendingComponent(dbDir, String::format("%016" PRIx64 ".db", seq));
} while (fileExists(fileName));
- return String::format("%016"PRIx64".db", seq);
+ return String::format("%016" PRIx64 ".db", seq);
}
String SQLiteFileSystem::appendDatabaseFileNameToPath(const String& path, const String& fileName)