diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-06-27 20:44:16 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-06-28 13:02:26 (GMT) |
commit | 1d6909a287bb73b5ec7bf51ec56f7efcf2a869eb (patch) | |
tree | 3c13e63f2529d877b865475b5269a96ef5e0a4cb /Source/CursesDialog | |
parent | b4b73f56a26c1e1d630e3f262d2d4bafee8231c4 (diff) | |
download | CMake-1d6909a287bb73b5ec7bf51ec56f7efcf2a869eb.zip CMake-1d6909a287bb73b5ec7bf51ec56f7efcf2a869eb.tar.gz CMake-1d6909a287bb73b5ec7bf51ec56f7efcf2a869eb.tar.bz2 |
use CM_NULLPTR
Diffstat (limited to 'Source/CursesDialog')
-rw-r--r-- | Source/CursesDialog/ccmake.cxx | 27 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesCacheEntryComposite.cxx | 6 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesForm.cxx | 4 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesLongMessageForm.cxx | 8 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesMainForm.cxx | 34 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesMainForm.h | 2 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesStringWidget.cxx | 2 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesWidget.cxx | 2 |
8 files changed, 43 insertions, 42 deletions
diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx index be8751c..606c954 100644 --- a/Source/CursesDialog/ccmake.cxx +++ b/Source/CursesDialog/ccmake.cxx @@ -24,29 +24,30 @@ #include <form.h> static const char* cmDocumentationName[][2] = { - { 0, " ccmake - Curses Interface for CMake." }, - { 0, 0 } + { CM_NULLPTR, " ccmake - Curses Interface for CMake." }, + { CM_NULLPTR, CM_NULLPTR } }; static const char* cmDocumentationUsage[][2] = { - { 0, " ccmake <path-to-source>\n" - " ccmake <path-to-existing-build>" }, - { 0, "Specify a source directory to (re-)generate a build system for " - "it in the current working directory. Specify an existing build " - "directory to re-generate its build system." }, - { 0, 0 } + { CM_NULLPTR, " ccmake <path-to-source>\n" + " ccmake <path-to-existing-build>" }, + { CM_NULLPTR, + "Specify a source directory to (re-)generate a build system for " + "it in the current working directory. Specify an existing build " + "directory to re-generate its build system." }, + { CM_NULLPTR, CM_NULLPTR } }; static const char* cmDocumentationUsageNote[][2] = { - { 0, "Run 'ccmake --help' for more information." }, - { 0, 0 } + { CM_NULLPTR, "Run 'ccmake --help' for more information." }, + { CM_NULLPTR, CM_NULLPTR } }; static const char* cmDocumentationOptions[] [2] = { CMAKE_STANDARD_OPTIONS_TABLE, - { 0, 0 } }; + { CM_NULLPTR, CM_NULLPTR } }; -cmCursesForm* cmCursesForm::CurrentForm = 0; +cmCursesForm* cmCursesForm::CurrentForm = CM_NULLPTR; extern "C" { @@ -176,7 +177,7 @@ int main(int argc, char const* const* argv) touchwin(stdscr); endwin(); delete cmCursesForm::CurrentForm; - cmCursesForm::CurrentForm = 0; + cmCursesForm::CurrentForm = CM_NULLPTR; std::cout << std::endl << std::endl; diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx index bdfc8e9..ea12756 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx @@ -32,7 +32,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite( { this->Label = new cmCursesLabelWidget(this->LabelWidth, 1, 1, 1, key); this->IsNewLabel = new cmCursesLabelWidget(1, 1, 1, 1, " "); - this->Entry = 0; + this->Entry = CM_NULLPTR; this->Entry = new cmCursesStringWidget(this->EntryWidth, 1, 1, 1); } @@ -50,7 +50,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite( this->IsNewLabel = new cmCursesLabelWidget(1, 1, 1, 1, " "); } - this->Entry = 0; + this->Entry = CM_NULLPTR; const char* value = cm->GetState()->GetCacheEntryValue(key); assert(value); switch (cm->GetState()->GetCacheEntryType(key)) { @@ -111,6 +111,6 @@ const char* cmCursesCacheEntryComposite::GetValue() if (this->Label) { return this->Label->GetValue(); } else { - return 0; + return CM_NULLPTR; } } diff --git a/Source/CursesDialog/cmCursesForm.cxx b/Source/CursesDialog/cmCursesForm.cxx index aa4710f..b3320c9 100644 --- a/Source/CursesDialog/cmCursesForm.cxx +++ b/Source/CursesDialog/cmCursesForm.cxx @@ -16,7 +16,7 @@ bool cmCursesForm::Debug = false; cmCursesForm::cmCursesForm() { - this->Form = 0; + this->Form = CM_NULLPTR; } cmCursesForm::~cmCursesForm() @@ -24,7 +24,7 @@ cmCursesForm::~cmCursesForm() if (this->Form) { unpost_form(this->Form); free_form(this->Form); - this->Form = 0; + this->Form = CM_NULLPTR; } } diff --git a/Source/CursesDialog/cmCursesLongMessageForm.cxx b/Source/CursesDialog/cmCursesLongMessageForm.cxx index d03d330..48cc42c 100644 --- a/Source/CursesDialog/cmCursesLongMessageForm.cxx +++ b/Source/CursesDialog/cmCursesLongMessageForm.cxx @@ -32,8 +32,8 @@ cmCursesLongMessageForm::cmCursesLongMessageForm( this->Messages += "\n\n"; } this->Title = title; - this->Fields[0] = 0; - this->Fields[1] = 0; + this->Fields[0] = CM_NULLPTR; + this->Fields[1] = CM_NULLPTR; } cmCursesLongMessageForm::~cmCursesLongMessageForm() @@ -110,7 +110,7 @@ void cmCursesLongMessageForm::Render(int, int, int, int) if (this->Form) { unpost_form(this->Form); free_form(this->Form); - this->Form = 0; + this->Form = CM_NULLPTR; } const char* msg = this->Messages.c_str(); @@ -119,7 +119,7 @@ void cmCursesLongMessageForm::Render(int, int, int, int) if (this->Fields[0]) { free_field(this->Fields[0]); - this->Fields[0] = 0; + this->Fields[0] = CM_NULLPTR; } this->Fields[0] = new_field(y - 6, x - 2, 1, 1, 0, 0); diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index b740eb0..9ae38d6 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -36,8 +36,8 @@ cmCursesMainForm::cmCursesMainForm(std::vector<std::string> const& args, , InitialWidth(initWidth) { this->NumberOfPages = 0; - this->Fields = 0; - this->Entries = 0; + this->Fields = CM_NULLPTR; + this->Entries = CM_NULLPTR; this->AdvancedMode = false; this->NumberOfVisibleEntries = 0; this->OkToGenerate = false; @@ -64,7 +64,7 @@ cmCursesMainForm::~cmCursesMainForm() if (this->Form) { unpost_form(this->Form); free_form(this->Form); - this->Form = 0; + this->Form = CM_NULLPTR; } delete[] this->Fields; @@ -75,7 +75,7 @@ cmCursesMainForm::~cmCursesMainForm() delete this->Entries; if (this->CMakeInstance) { delete this->CMakeInstance; - this->CMakeInstance = 0; + this->CMakeInstance = CM_NULLPTR; } } @@ -185,7 +185,7 @@ void cmCursesMainForm::RePost() if (this->Form) { unpost_form(this->Form); free_form(this->Form); - this->Form = 0; + this->Form = CM_NULLPTR; } delete[] this->Fields; if (this->AdvancedMode) { @@ -215,7 +215,7 @@ void cmCursesMainForm::RePost() this->Fields = new FIELD*[3 * this->NumberOfVisibleEntries + 1]; size_t cc; for (cc = 0; cc < 3 * this->NumberOfVisibleEntries + 1; cc++) { - this->Fields[cc] = 0; + this->Fields[cc] = CM_NULLPTR; } // Assign fields @@ -244,7 +244,7 @@ void cmCursesMainForm::RePost() this->NumberOfVisibleEntries = 1; } // Has to be null terminated. - this->Fields[3 * this->NumberOfVisibleEntries] = 0; + this->Fields[3 * this->NumberOfVisibleEntries] = CM_NULLPTR; } void cmCursesMainForm::Render(int left, int top, int width, int height) @@ -263,7 +263,7 @@ void cmCursesMainForm::Render(int left, int top, int width, int height) // Delete the previous form unpost_form(this->Form); free_form(this->Form); - this->Form = 0; + this->Form = CM_NULLPTR; } // Wrong window size @@ -345,7 +345,7 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */) } // Give the current widget (if it exists), a chance to print keys - cmCursesWidget* cw = 0; + cmCursesWidget* cw = CM_NULLPTR; if (this->Form) { FIELD* currentField = current_field(this->Form); cw = reinterpret_cast<cmCursesWidget*>(field_userptr(currentField)); @@ -434,7 +434,7 @@ void cmCursesMainForm::UpdateStatusBar(const char* message) // Get the key of the current entry FIELD* cur = current_field(this->Form); int findex = field_index(cur); - cmCursesWidget* lbl = 0; + cmCursesWidget* lbl = CM_NULLPTR; if (findex >= 0) { lbl = reinterpret_cast<cmCursesWidget*>( field_userptr(this->Fields[findex - 2])); @@ -566,7 +566,7 @@ int cmCursesMainForm::Configure(int noconfigure) this->FillCacheManagerFromUI(); this->CMakeInstance->SaveCache( this->CMakeInstance->GetHomeOutputDirectory()); - this->LoadCache(0); + this->LoadCache(CM_NULLPTR); // Get rid of previous errors this->Errors = std::vector<std::string>(); @@ -583,7 +583,7 @@ int cmCursesMainForm::Configure(int noconfigure) } else { retVal = this->CMakeInstance->Configure(); } - this->CMakeInstance->SetProgressCallback(0, 0); + this->CMakeInstance->SetProgressCallback(CM_NULLPTR, CM_NULLPTR); keypad(stdscr, TRUE); /* Use key symbols as KEY_DOWN*/ @@ -638,7 +638,7 @@ int cmCursesMainForm::Generate() // run the generate process int retVal = this->CMakeInstance->Generate(); - this->CMakeInstance->SetProgressCallback(0, 0); + this->CMakeInstance->SetProgressCallback(CM_NULLPTR, CM_NULLPTR); keypad(stdscr, TRUE); /* Use key symbols as KEY_DOWN*/ @@ -888,7 +888,7 @@ void cmCursesMainForm::HandleInput() cmCursesWidget* lbl = reinterpret_cast<cmCursesWidget*>( field_userptr(this->Fields[findex - 2])); const char* curField = lbl->GetValue(); - const char* helpString = 0; + const char* helpString = CM_NULLPTR; const char* existingValue = this->CMakeInstance->GetState()->GetCacheEntryValue(curField); @@ -973,7 +973,7 @@ void cmCursesMainForm::HandleInput() // (findex always corresponds to the value field) FIELD* nextCur; if (findex == 2) { - nextCur = 0; + nextCur = CM_NULLPTR; } else if (findex == 3 * this->NumberOfVisibleEntries - 1) { nextCur = this->Fields[findex - 5]; } else { @@ -1003,7 +1003,7 @@ void cmCursesMainForm::HandleInput() if (nextCur) { // make the next or prev. current field after deletion - nextCur = 0; + nextCur = CM_NULLPTR; std::vector<cmCursesCacheEntryComposite*>::iterator it; for (it = this->Entries->begin(); it != this->Entries->end(); ++it) { @@ -1052,7 +1052,7 @@ void cmCursesMainForm::JumpToCacheEntry(const char* astr) int findex = start_index; for (;;) { if (!str.empty()) { - cmCursesWidget* lbl = 0; + cmCursesWidget* lbl = CM_NULLPTR; if (findex >= 0) { lbl = reinterpret_cast<cmCursesWidget*>( field_userptr(this->Fields[findex - 2])); diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h index a8e99b6..d17ee33 100644 --- a/Source/CursesDialog/cmCursesMainForm.h +++ b/Source/CursesDialog/cmCursesMainForm.h @@ -67,7 +67,7 @@ public: * exception is during a resize. The optional argument specifies the * string to be displayed in the status bar. */ - void UpdateStatusBar() CM_OVERRIDE { this->UpdateStatusBar(0); } + void UpdateStatusBar() CM_OVERRIDE { this->UpdateStatusBar(CM_NULLPTR); } virtual void UpdateStatusBar(const char* message); /** diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx index 3707d0d..6eb5310 100644 --- a/Source/CursesDialog/cmCursesStringWidget.cxx +++ b/Source/CursesDialog/cmCursesStringWidget.cxx @@ -72,7 +72,7 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm, return false; } - this->OriginalString = 0; + this->OriginalString = CM_NULLPTR; this->Done = false; char debugMessage[128]; diff --git a/Source/CursesDialog/cmCursesWidget.cxx b/Source/CursesDialog/cmCursesWidget.cxx index 100ed1d..49f2795 100644 --- a/Source/CursesDialog/cmCursesWidget.cxx +++ b/Source/CursesDialog/cmCursesWidget.cxx @@ -23,7 +23,7 @@ cmCursesWidget::~cmCursesWidget() { if (this->Field) { free_field(this->Field); - this->Field = 0; + this->Field = CM_NULLPTR; } } |