Fix build.
This commit is contained in:
@ -7,12 +7,12 @@
|
||||
//#include <shlwapi.h> // PathFileExists
|
||||
#include <windows.h> // GetFileAttributes
|
||||
#include <direct.h> // _mkdir
|
||||
#include <stdio.h> // remove, unlink
|
||||
#else
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <stdio.h> // remove, unlink
|
||||
|
||||
using namespace nv;
|
||||
|
||||
@ -59,4 +59,4 @@ bool FileSystem::removeFile(const char * path)
|
||||
{
|
||||
// @@ Use unlink or remove?
|
||||
return remove(path) == 0;
|
||||
}
|
||||
}
|
||||
|
@ -5,13 +5,12 @@
|
||||
|
||||
#include "nvcore.h"
|
||||
#include "Debug.h"
|
||||
#include "RefCounted.h" // WeakProxy
|
||||
|
||||
|
||||
|
||||
namespace nv
|
||||
{
|
||||
class WeakProxy;
|
||||
|
||||
/** Simple auto pointer template class.
|
||||
*
|
||||
* This is very similar to the standard auto_ptr class, but with some
|
||||
@ -274,10 +273,10 @@ namespace nv
|
||||
|
||||
void operator=(T * p)
|
||||
{
|
||||
if (p) {
|
||||
if (p != NULL) {
|
||||
m_proxy = p->getWeakProxy();
|
||||
assert(m_proxy != NULL);
|
||||
assert(m_proxy->ptr() == p);
|
||||
nvDebugCheck(m_proxy != NULL);
|
||||
nvDebugCheck(m_proxy->ptr() == p);
|
||||
}
|
||||
else {
|
||||
m_proxy = NULL;
|
||||
@ -298,7 +297,7 @@ namespace nv
|
||||
T * operator->() const
|
||||
{
|
||||
T * p = ptr();
|
||||
assert(p != NULL);
|
||||
nvDebugCheck(p != NULL);
|
||||
return p;
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,8 @@
|
||||
#define NV_STRING2(x) #x
|
||||
#define NV_STRING(x) NV_STRING2(x)
|
||||
#if NV_CC_GNUC
|
||||
#define NV_FILE_LINE __FILE__ ":" NV_STRING(__LINE__) ": "
|
||||
//#define NV_FILE_LINE __FILE__ ":" NV_STRING(__LINE__) ": "
|
||||
#define NV_FILE_LINE
|
||||
#else
|
||||
#define NV_FILE_LINE __FILE__ "(" NV_STRING(__LINE__) ") : "
|
||||
#endif
|
||||
@ -153,6 +154,9 @@
|
||||
/// Null index. @@ Move this somewhere else... This could have collisions with other definitions!
|
||||
#define NIL uint(~0)
|
||||
|
||||
// @@ Move this to DefsGnuc?
|
||||
#include <cstddef> // size_t, NULL
|
||||
|
||||
/// Null pointer.
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
|
Reference in New Issue
Block a user