Fix the few non-portable uses of "char" (where a -1 might be relevant): All uses of char are now either "int", "unsigned char" or char arrays for storing strings. Also, went to consistent "char* foo" coding convention. (There were only a few ambiguous uses.)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@25400 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
52c351442c
commit
51cdd90fa8
15 changed files with 72 additions and 72 deletions
|
|
@ -226,7 +226,7 @@ const char* ProfileName(EProfile profile)
|
|||
// Operation: If the current profile is not one of the profileMask,
|
||||
// give an error message.
|
||||
//
|
||||
void TParseContext::requireProfile(TSourceLoc loc, int profileMask, const char *featureDesc)
|
||||
void TParseContext::requireProfile(TSourceLoc loc, int profileMask, const char* featureDesc)
|
||||
{
|
||||
if (! (profile & profileMask))
|
||||
error(loc, "not supported with this profile:", featureDesc, ProfileName(profile));
|
||||
|
|
@ -265,7 +265,7 @@ const char* StageName(EShLanguage stage)
|
|||
//
|
||||
|
||||
// entry point that takes multiple extensions
|
||||
void TParseContext::profileRequires(TSourceLoc loc, int profileMask, int minVersion, int numExtensions, const char* const extensions[], const char *featureDesc)
|
||||
void TParseContext::profileRequires(TSourceLoc loc, int profileMask, int minVersion, int numExtensions, const char* const extensions[], const char* featureDesc)
|
||||
{
|
||||
if (profile & profileMask) {
|
||||
bool okay = false;
|
||||
|
|
@ -290,7 +290,7 @@ void TParseContext::profileRequires(TSourceLoc loc, int profileMask, int minVers
|
|||
}
|
||||
|
||||
// entry point for the above that takes a single extension
|
||||
void TParseContext::profileRequires(TSourceLoc loc, int profileMask, int minVersion, const char* extension, const char *featureDesc)
|
||||
void TParseContext::profileRequires(TSourceLoc loc, int profileMask, int minVersion, const char* extension, const char* featureDesc)
|
||||
{
|
||||
profileRequires(loc, profileMask, minVersion, extension ? 1 : 0, &extension, featureDesc);
|
||||
}
|
||||
|
|
@ -302,7 +302,7 @@ void TParseContext::profileRequires(TSourceLoc loc, int profileMask, int minVers
|
|||
//
|
||||
// Operation: If the current stage is not present, give an error message.
|
||||
//
|
||||
void TParseContext::requireStage(TSourceLoc loc, EShLanguageMask languageMask, const char *featureDesc)
|
||||
void TParseContext::requireStage(TSourceLoc loc, EShLanguageMask languageMask, const char* featureDesc)
|
||||
{
|
||||
if (((1 << language) & languageMask) == 0)
|
||||
error(loc, "not supported in this stage:", featureDesc, StageName(language));
|
||||
|
|
@ -310,7 +310,7 @@ void TParseContext::requireStage(TSourceLoc loc, EShLanguageMask languageMask, c
|
|||
|
||||
// If only one stage supports a feature, this can be called. But, all supporting stages
|
||||
// must be specified with one call.
|
||||
void TParseContext::requireStage(TSourceLoc loc, EShLanguage stage, const char *featureDesc)
|
||||
void TParseContext::requireStage(TSourceLoc loc, EShLanguage stage, const char* featureDesc)
|
||||
{
|
||||
requireStage(loc, static_cast<EShLanguageMask>(1 << stage), featureDesc);
|
||||
}
|
||||
|
|
@ -319,7 +319,7 @@ void TParseContext::requireStage(TSourceLoc loc, EShLanguage stage, const char *
|
|||
// Within a set of profiles, see if a feature is deprecated and give an error or warning based on whether
|
||||
// a future compatibility context is being use.
|
||||
//
|
||||
void TParseContext::checkDeprecated(TSourceLoc loc, int profileMask, int depVersion, const char *featureDesc)
|
||||
void TParseContext::checkDeprecated(TSourceLoc loc, int profileMask, int depVersion, const char* featureDesc)
|
||||
{
|
||||
if (profile & profileMask) {
|
||||
if (version >= depVersion) {
|
||||
|
|
@ -336,7 +336,7 @@ void TParseContext::checkDeprecated(TSourceLoc loc, int profileMask, int depVers
|
|||
// Within a set of profiles, see if a feature has now been removed and if so, give an error.
|
||||
// The version argument is the first version no longer having the feature.
|
||||
//
|
||||
void TParseContext::requireNotRemoved(TSourceLoc loc, int profileMask, int removedVersion, const char *featureDesc)
|
||||
void TParseContext::requireNotRemoved(TSourceLoc loc, int profileMask, int removedVersion, const char* featureDesc)
|
||||
{
|
||||
if (profile & profileMask) {
|
||||
if (version >= removedVersion) {
|
||||
|
|
@ -352,7 +352,7 @@ void TParseContext::requireNotRemoved(TSourceLoc loc, int profileMask, int remov
|
|||
// Use when there are no profile/version to check, it's just an error if one of the
|
||||
// extensions is not present.
|
||||
//
|
||||
void TParseContext::requireExtensions(TSourceLoc loc, int numExtensions, const char* const extensions[], const char *featureDesc)
|
||||
void TParseContext::requireExtensions(TSourceLoc loc, int numExtensions, const char* const extensions[], const char* featureDesc)
|
||||
{
|
||||
// First, see if any of the extensions are enabled
|
||||
for (int i = 0; i < numExtensions; ++i) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue