glslang: Fix over 100 warnings from MSVC warning level 4.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31202 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2015-05-15 17:30:55 +00:00
parent 2aa7f3a671
commit 93dfbe1309
35 changed files with 178 additions and 168 deletions

View file

@ -185,8 +185,6 @@ public:
assert(false && "Default missing");
return false;
}
return false;
}
bool operator<(const TConstUnion& constant) const
@ -212,8 +210,6 @@ public:
assert(false && "Default missing");
return false;
}
return false;
}
TConstUnion operator+(const TConstUnion& constant) const

View file

@ -214,11 +214,13 @@ protected:
typedef std::vector<tAllocState> tAllocStack;
// Track allocations if and only if we're using guard blocks
#ifndef GUARD_BLOCKS
void* initializeAllocation(tHeader*, unsigned char* memory, size_t) {
#else
void* initializeAllocation(tHeader* block, unsigned char* memory, size_t numBytes) {
# ifdef GUARD_BLOCKS
new(memory) TAllocation(numBytes, memory, block->lastAllocation);
block->lastAllocation = reinterpret_cast<TAllocation*>(memory);
# endif
#endif
// This is optimized entirely away if GUARD_BLOCKS is not defined.
return TAllocation::offsetAllocation(memory);
@ -314,7 +316,7 @@ public:
TPoolAllocator& getAllocator() const { return allocator; }
protected:
pool_allocator& operator=(const pool_allocator& rhs) { return *this; }
pool_allocator& operator=(const pool_allocator&) { return *this; }
TPoolAllocator& allocator;
};

View file

@ -98,6 +98,8 @@ public:
TInfoSink& infoSink;
protected:
TCompiler& operator=(TCompiler&);
EShLanguage language;
bool haveValidObjectCode;
};
@ -137,6 +139,7 @@ public:
virtual TInfoSink& getInfoSink() { return infoSink; }
TInfoSink& infoSink;
protected:
TLinker& operator=(TLinker&);
EShExecutable executable;
bool haveReturnableObjectCode; // true when objectCode is acceptable to send to driver

View file

@ -694,15 +694,15 @@ public:
maxDepth(0) { }
virtual ~TIntermTraverser() { }
virtual void visitSymbol(TIntermSymbol*) { }
virtual void visitConstantUnion(TIntermConstantUnion*) { }
virtual bool visitBinary(TVisit visit, TIntermBinary*) { return true; }
virtual bool visitUnary(TVisit visit, TIntermUnary*) { return true; }
virtual bool visitSelection(TVisit visit, TIntermSelection*) { return true; }
virtual bool visitAggregate(TVisit visit, TIntermAggregate*) { return true; }
virtual bool visitLoop(TVisit visit, TIntermLoop*) { return true; }
virtual bool visitBranch(TVisit visit, TIntermBranch*) { return true; }
virtual bool visitSwitch(TVisit, TIntermSwitch* node) { return true; }
virtual void visitSymbol(TIntermSymbol*) { }
virtual void visitConstantUnion(TIntermConstantUnion*) { }
virtual bool visitBinary(TVisit, TIntermBinary*) { return true; }
virtual bool visitUnary(TVisit, TIntermUnary*) { return true; }
virtual bool visitSelection(TVisit, TIntermSelection*) { return true; }
virtual bool visitAggregate(TVisit, TIntermAggregate*) { return true; }
virtual bool visitLoop(TVisit, TIntermLoop*) { return true; }
virtual bool visitBranch(TVisit, TIntermBranch*) { return true; }
virtual bool visitSwitch(TVisit, TIntermSwitch*) { return true; }
int getMaxDepth() const { return maxDepth; }
@ -730,6 +730,8 @@ public:
const bool rightToLeft;
protected:
TIntermTraverser& operator=(TIntermTraverser&);
int depth;
int maxDepth;