Fix initialization order warnings.
Bug 15387371
Change-Id: I01da3db7d6bb795c46153dbc12fd41478f4b6416
Reviewed-on: https://swiftshader-review.googlesource.com/4493
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
diff --git a/src/OpenGL/compiler/OutputASM.cpp b/src/OpenGL/compiler/OutputASM.cpp
index 3245b67..95069f0 100644
--- a/src/OpenGL/compiler/OutputASM.cpp
+++ b/src/OpenGL/compiler/OutputASM.cpp
@@ -193,7 +193,7 @@
else UNREACHABLE(0);
}
- OutputASM::OutputASM(TParseContext &context, Shader *shaderObject) : TIntermTraverser(true, true, true), mContext(context), shaderObject(shaderObject)
+ OutputASM::OutputASM(TParseContext &context, Shader *shaderObject) : TIntermTraverser(true, true, true), shaderObject(shaderObject), mContext(context)
{
shader = 0;
pixelShader = 0;
diff --git a/src/OpenGL/libGL/IndexDataManager.cpp b/src/OpenGL/libGL/IndexDataManager.cpp
index 69f6db3..0981cb3 100644
--- a/src/OpenGL/libGL/IndexDataManager.cpp
+++ b/src/OpenGL/libGL/IndexDataManager.cpp
@@ -166,7 +166,7 @@
}
}
-StreamingIndexBuffer::StreamingIndexBuffer(unsigned int initialSize) : mBufferSize(initialSize), mIndexBuffer(NULL)
+StreamingIndexBuffer::StreamingIndexBuffer(unsigned int initialSize) : mIndexBuffer(nullptr), mBufferSize(initialSize)
{
if(initialSize > 0)
{
diff --git a/src/OpenGL/libGLES_CM/IndexDataManager.cpp b/src/OpenGL/libGLES_CM/IndexDataManager.cpp
index 29be00a..3e31314 100644
--- a/src/OpenGL/libGLES_CM/IndexDataManager.cpp
+++ b/src/OpenGL/libGLES_CM/IndexDataManager.cpp
@@ -148,7 +148,7 @@
}
}
-StreamingIndexBuffer::StreamingIndexBuffer(unsigned int initialSize) : mBufferSize(initialSize), mIndexBuffer(NULL)
+StreamingIndexBuffer::StreamingIndexBuffer(unsigned int initialSize) : mIndexBuffer(nullptr), mBufferSize(initialSize)
{
if(initialSize > 0)
{
diff --git a/src/OpenGL/libGLESv2/Context.cpp b/src/OpenGL/libGLESv2/Context.cpp
index a364b81..9710f64 100644
--- a/src/OpenGL/libGLESv2/Context.cpp
+++ b/src/OpenGL/libGLESv2/Context.cpp
@@ -40,7 +40,7 @@
namespace es2
{
Context::Context(const egl::Config *config, const Context *shareContext, EGLint clientVersion)
- : mConfig(config), clientVersion(clientVersion)
+ : clientVersion(clientVersion), mConfig(config)
{
sw::Context *context = new sw::Context();
device = new es2::Device(context);
diff --git a/src/Renderer/Renderer.cpp b/src/Renderer/Renderer.cpp
index 49e856e..3d3d4dc 100644
--- a/src/Renderer/Renderer.cpp
+++ b/src/Renderer/Renderer.cpp
@@ -99,7 +99,7 @@
deallocate(data);
}
- Renderer::Renderer(Context *context, Conventions conventions, bool exactColorRounding) : context(context), VertexProcessor(context), PixelProcessor(context), SetupProcessor(context), viewport()
+ Renderer::Renderer(Context *context, Conventions conventions, bool exactColorRounding) : VertexProcessor(context), PixelProcessor(context), SetupProcessor(context), context(context), viewport()
{
sw::halfIntegerCoordinates = conventions.halfIntegerCoordinates;
sw::symmetricNormalizedDepth = conventions.symmetricNormalizedDepth;