Fixed a compile error when ALLOW_PROCEDURAL_PLANETS was defined. Eliminated some build warnings.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1177 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
8f887ebfce
commit
9051c61d31
@ -337,7 +337,7 @@ static GLfloat texture_uv_array[10400 * 2];
|
||||
atmosphere = nil;
|
||||
|
||||
#ifdef ALLOW_PROCEDURAL_PLANETS
|
||||
OOColor* cloudColor = [OOColor colorWithCalibratedRed: amb_sea[0] green: amb_sea[1] blue: amb_sea[2] alpha: 1.0];
|
||||
cloudColor = [OOColor colorWithCalibratedRed: amb_sea[0] green: amb_sea[1] blue: amb_sea[2] alpha: 1.0];
|
||||
float cloud_bias = -0.01 * (float)percent_land;
|
||||
float cloud_impress = 1.0 - cloud_bias;
|
||||
|
||||
|
@ -171,7 +171,7 @@ static NSString *GetGLSLInfoLog(GLhandleARB shaderObject);
|
||||
- (id)initWithVertexShaderSource:(NSString *)vertexSource fragmentShaderSource:(NSString *)fragmentSource key:(NSString *)inKey
|
||||
{
|
||||
BOOL OK = YES;
|
||||
const GLcharARB *sourceString = nil;
|
||||
const GLcharARB *sourceString = NULL;
|
||||
GLint compileStatus;
|
||||
|
||||
OO_ENTER_OPENGL();
|
||||
@ -311,7 +311,7 @@ static BOOL GetShaderSource(NSString *fileName, NSString *shaderType, NSString *
|
||||
static NSString *GetGLSLInfoLog(GLhandleARB shaderObject)
|
||||
{
|
||||
GLint length;
|
||||
GLcharARB *log = nil;
|
||||
GLcharARB *log = NULL;
|
||||
NSString *result = nil;
|
||||
|
||||
OO_ENTER_OPENGL();
|
||||
|
@ -159,7 +159,7 @@ OOINLINE void FreeElement(OOAsyncQueueElement *element)
|
||||
[_lock lock];
|
||||
|
||||
// Get an element.
|
||||
if (_pool != nil)
|
||||
if (_pool != NULL)
|
||||
{
|
||||
element = _pool;
|
||||
_pool = element->next;
|
||||
@ -176,7 +176,7 @@ OOINLINE void FreeElement(OOAsyncQueueElement *element)
|
||||
element->next = NULL;
|
||||
|
||||
// Insert in queue.
|
||||
if (_head == nil)
|
||||
if (_head == NULL)
|
||||
{
|
||||
// Queue was empty, element is entire queue.
|
||||
_head = _tail = element;
|
||||
|
@ -114,7 +114,7 @@ static unsigned IntegerFromString(const GLubyte **ioString);
|
||||
{
|
||||
NSString *extensionString = nil;
|
||||
NSArray *components = nil;
|
||||
const GLubyte *versionString = nil, *curr = nil;
|
||||
const GLubyte *versionString = NULL, *curr = NULL;
|
||||
|
||||
self = [super init];
|
||||
if (self != nil)
|
||||
|
@ -471,7 +471,7 @@ OOINLINE NSComparisonResult PQCompare(id a, id b, SEL comparator)
|
||||
newCapacity = _capacity + 1;
|
||||
newBuffer = realloc(_buffer, newCapacity * sizeof(id));
|
||||
|
||||
if (newBuffer == nil)
|
||||
if (newBuffer == NULL)
|
||||
{
|
||||
// Failed to grow.
|
||||
[NSException raise:NSMallocException
|
||||
|
@ -36,7 +36,7 @@
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
@ -428,7 +428,7 @@ VERIFY_PROTO(DelegatedType);
|
||||
NSDictionary *resolvedSpecifier = nil;
|
||||
NSAutoreleasePool *pool = nil;
|
||||
|
||||
assert(outStop != nil);
|
||||
assert(outStop != NULL);
|
||||
|
||||
pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
@ -1464,7 +1464,7 @@ static NSError *ErrorWithDictionaryAndArguments(OOPListSchemaVerifierErrorCode e
|
||||
|
||||
userInfo = [NSMutableDictionary dictionaryWithDictionary:dict];
|
||||
[userInfo setObject:message forKey:NSLocalizedDescriptionKey];
|
||||
if (keyPath != nil)
|
||||
if (keyPath != NULL)
|
||||
{
|
||||
[userInfo setObject:KeyPathToArray(*keyPath) forKey:kPListKeyPathErrorKey];
|
||||
}
|
||||
|
@ -643,7 +643,7 @@ static NSMutableDictionary *string_cache;
|
||||
path = [self pathForFileNamed:fileName inFolder:folderName];
|
||||
if (path != nil) result = [[[class alloc] initWithContentsOfFile:path] autorelease];
|
||||
|
||||
if (result != nil && ioCache != nil)
|
||||
if (result != nil && ioCache != NULL)
|
||||
{
|
||||
if (*ioCache == nil) *ioCache = [[NSMutableDictionary alloc] init];
|
||||
[*ioCache setObject:result forKey:key];
|
||||
|
@ -619,7 +619,7 @@ static BOOL JSNewNSDictionaryValue(JSContext *context, NSDictionary *dictionary,
|
||||
|
||||
+ (id)stringWithJavaScriptParameters:(jsval *)params count:(uintN)count inContext:(JSContext *)context
|
||||
{
|
||||
if (params == nil && count != 0) return nil;
|
||||
if (params == NULL && count != 0) return nil;
|
||||
|
||||
uintN i;
|
||||
jsval val;
|
||||
@ -883,7 +883,7 @@ void JSRegisterObjectConverter(JSClass *theClass, JSClassConverterCallback conve
|
||||
if (sObjectConverters == nil) sObjectConverters = [[NSMutableDictionary alloc] init];
|
||||
|
||||
wrappedClass = [NSValue valueWithPointer:theClass];
|
||||
if (converter != nil)
|
||||
if (converter != NULL)
|
||||
{
|
||||
wrappedConverter = [NSValue valueWithPointer:converter];
|
||||
[sObjectConverters setObject:wrappedConverter forKey:wrappedClass];
|
||||
|
Loading…
x
Reference in New Issue
Block a user