clang-modernize -use-nullptr

and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
This commit is contained in:
Tillmann Karras
2014-03-09 21:14:26 +01:00
parent f28116b7da
commit d802d39281
292 changed files with 1526 additions and 1526 deletions

View File

@ -100,9 +100,9 @@ void InhibitScreensaver(Display *dpy, Window win, bool suspend)
(char *)"xdg-screensaver",
(char *)(suspend ? "suspend" : "resume"),
id,
NULL};
nullptr};
pid_t pid;
if (!posix_spawnp(&pid, "xdg-screensaver", NULL, NULL, argv, environ))
if (!posix_spawnp(&pid, "xdg-screensaver", nullptr, nullptr, argv, environ))
{
int status;
while (waitpid (pid, &status, 0) == -1);
@ -115,7 +115,7 @@ void InhibitScreensaver(Display *dpy, Window win, bool suspend)
XRRConfiguration::XRRConfiguration(Display *_dpy, Window _win)
: dpy(_dpy)
, win(_win)
, screenResources(NULL), outputInfo(NULL), crtcInfo(NULL)
, screenResources(nullptr), outputInfo(nullptr), crtcInfo(nullptr)
, fullMode(0)
, fs_fb_width(0), fs_fb_height(0), fs_fb_width_mm(0), fs_fb_height_mm(0)
, bValid(true), bIsFullscreen(false)
@ -165,18 +165,18 @@ void XRRConfiguration::Update()
if (outputInfo)
{
XRRFreeOutputInfo(outputInfo);
outputInfo = NULL;
outputInfo = nullptr;
}
if (crtcInfo)
{
XRRFreeCrtcInfo(crtcInfo);
crtcInfo = NULL;
crtcInfo = nullptr;
}
fullMode = 0;
// Get the resolution setings for fullscreen mode
unsigned int fullWidth, fullHeight;
char *output_name = NULL;
char *output_name = nullptr;
if (SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution.find(':') ==
std::string::npos)
{