浏览代码

misc: replace NULL with nullptr.

undefined
Sam Hocevar 10 年前
父节点
当前提交
4be9ea2a4e
共有 5 个文件被更改,包括 7 次插入7 次删除
  1. +1
    -1
      src/gpu/vertexbuffer.cpp
  2. +3
    -3
      src/image/codec/gdiplus-image.cpp
  3. +1
    -1
      src/platform/ps3/ps3app.cpp
  4. +1
    -1
      src/sys/file.cpp
  5. +1
    -1
      src/sys/thread.cpp

+ 1
- 1
src/gpu/vertexbuffer.cpp 查看文件

@@ -310,7 +310,7 @@ void VertexDeclaration::SetStream(VertexBuffer *vb, ShaderAttrib attr1,
{
#if defined _XBOX || defined USE_D3D9
// Don't bother in DirectX world, shader attributes are not used
SetStream(vb, NULL);
SetStream(vb, nullptr);
#else
ShaderAttrib attribs[12] = { attr1, attr2, attr3, attr4, attr5, attr6,
attr7, attr8, attr9, attr10, attr11, attr12 };


+ 3
- 3
src/image/codec/gdiplus-image.cpp 查看文件

@@ -138,7 +138,7 @@ bool GdiPlusImageCodec::Save(Image *image, char const *path)
{
ULONG_PTR token;
Gdiplus::GdiplusStartupInput input;
Gdiplus::GdiplusStartup(&token, &input, NULL);
Gdiplus::GdiplusStartup(&token, &input, nullptr);

wchar_t const *fmt;
if (strstr(path, ".gif"))
@@ -173,7 +173,7 @@ bool GdiPlusImageCodec::Save(Image *image, char const *path)
}

size_t len;
len = mbstowcs(NULL, path, 0);
len = mbstowcs(nullptr, path, 0);
wchar_t *wpath = new wchar_t[len + 1];
if (mbstowcs(wpath, path, len + 1) == (size_t)-1)
{
@@ -212,7 +212,7 @@ bool GdiPlusImageCodec::Save(Image *image, char const *path)
image->Unlock(pdst);
b->UnlockBits(&bdata);

if (b->Save(wpath, &clsid, NULL) != Gdiplus::Ok)
if (b->Save(wpath, &clsid, nullptr) != Gdiplus::Ok)
{
Log::Error("could not save GDI+ image '%s'\n", path);
delete[] wpath;


+ 1
- 1
src/platform/ps3/ps3app.cpp 查看文件

@@ -224,7 +224,7 @@ Ps3App::Ps3App(char const *title, ivec2 res, float fps) :

sys_ppu_thread_t thread;
ret = sys_ppu_thread_create(&thread, Ps3AppData::MultiStreamThread,
NULL, 0 /* Server prio */,
nullptr, 0 /* Server prio */,
0x4000 /* 16 KiB stack */,
SYS_PPU_THREAD_CREATE_JOINABLE,
"Audio Thread");


+ 1
- 1
src/sys/file.cpp 查看文件

@@ -75,7 +75,7 @@ class FileData
#if __CELLOS_LV2__
String realfile = String(SYS_APP_HOME) + '/' + file;
CellFsErrno err = cellFsOpen(realfile.C(), CELL_FS_O_RDONLY,
&m_fd, NULL, 0);
&m_fd, nullptr, 0);
if (err != CELL_FS_SUCCEEDED)
m_fd = -1;
#elif __ANDROID__


+ 1
- 1
src/sys/thread.cpp 查看文件

@@ -98,7 +98,7 @@ void *BaseThreadManager::BaseThreadWork(void* data)
}
}
that->m_donequeue.Push(ThreadStatus::THREAD_STOPPED);
return NULL;
return nullptr;
}

void BaseThreadManager::TickGame(float seconds)


正在加载...
取消
保存