diff options
Diffstat (limited to 'Source/CursesDialog')
-rw-r--r-- | Source/CursesDialog/ccmake.cxx | 27 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesBoolWidget.h | 2 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesCacheEntryComposite.cxx | 6 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesDummyWidget.h | 2 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesForm.cxx | 4 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesLabelWidget.h | 4 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesLongMessageForm.cxx | 8 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesLongMessageForm.h | 8 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesMainForm.cxx | 34 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesMainForm.h | 10 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesOptionsWidget.h | 2 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesPathWidget.h | 6 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesStringWidget.cxx | 2 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesStringWidget.h | 6 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesWidget.cxx | 2 |
15 files changed, 62 insertions, 61 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/cmCursesBoolWidget.h b/Source/CursesDialog/cmCursesBoolWidget.h index 49be45a..d2899ee 100644 --- a/Source/CursesDialog/cmCursesBoolWidget.h +++ b/Source/CursesDialog/cmCursesBoolWidget.h @@ -25,7 +25,7 @@ public: // Handle user input. Called by the container of this widget // when this widget has focus. Returns true if the input was // handled. - virtual bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w); + bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w) CM_OVERRIDE; // Description: // Set/Get the value (on/off). 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/cmCursesDummyWidget.h b/Source/CursesDialog/cmCursesDummyWidget.h index 9a3df29..e6ca91e 100644 --- a/Source/CursesDialog/cmCursesDummyWidget.h +++ b/Source/CursesDialog/cmCursesDummyWidget.h @@ -25,7 +25,7 @@ public: // Handle user input. Called by the container of this widget // when this widget has focus. Returns true if the input was // handled. - virtual bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w); + bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w) CM_OVERRIDE; protected: cmCursesDummyWidget(const cmCursesDummyWidget& from); 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/cmCursesLabelWidget.h b/Source/CursesDialog/cmCursesLabelWidget.h index c31a58c..ff645af 100644 --- a/Source/CursesDialog/cmCursesLabelWidget.h +++ b/Source/CursesDialog/cmCursesLabelWidget.h @@ -21,13 +21,13 @@ class cmCursesLabelWidget : public cmCursesWidget public: cmCursesLabelWidget(int width, int height, int left, int top, const std::string& name); - virtual ~cmCursesLabelWidget(); + ~cmCursesLabelWidget() CM_OVERRIDE; // Description: // Handle user input. Called by the container of this widget // when this widget has focus. Returns true if the input was // handled - virtual bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w); + bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w) CM_OVERRIDE; protected: cmCursesLabelWidget(const cmCursesLabelWidget& from); 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/cmCursesLongMessageForm.h b/Source/CursesDialog/cmCursesLongMessageForm.h index 73ccfc4..a12ed2f 100644 --- a/Source/CursesDialog/cmCursesLongMessageForm.h +++ b/Source/CursesDialog/cmCursesLongMessageForm.h @@ -23,16 +23,16 @@ class cmCursesLongMessageForm : public cmCursesForm public: cmCursesLongMessageForm(std::vector<std::string> const& messages, const char* title); - virtual ~cmCursesLongMessageForm(); + ~cmCursesLongMessageForm() CM_OVERRIDE; // Description: // Handle user input. - virtual void HandleInput(); + void HandleInput() CM_OVERRIDE; // Description: // Display form. Use a window of size width x height, starting // at top, left. - virtual void Render(int left, int top, int width, int height); + void Render(int left, int top, int width, int height) CM_OVERRIDE; // Description: // This method should normally called only by the form. @@ -42,7 +42,7 @@ public: // Description: // This method should normally called only by the form. // The only exception is during a resize. - virtual void UpdateStatusBar(); + void UpdateStatusBar() CM_OVERRIDE; protected: cmCursesLongMessageForm(const cmCursesLongMessageForm& from); 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 9aa0f67..d17ee33 100644 --- a/Source/CursesDialog/cmCursesMainForm.h +++ b/Source/CursesDialog/cmCursesMainForm.h @@ -30,7 +30,7 @@ class cmCursesMainForm : public cmCursesForm { public: cmCursesMainForm(std::vector<std::string> const& args, int initwidth); - virtual ~cmCursesMainForm(); + ~cmCursesMainForm() CM_OVERRIDE; /** * Set the widgets which represent the cache entries. @@ -40,13 +40,13 @@ public: /** * Handle user input. */ - virtual void HandleInput(); + void HandleInput() CM_OVERRIDE; /** * Display form. Use a window of size width x height, starting * at top, left. */ - virtual void Render(int left, int top, int width, int height); + void Render(int left, int top, int width, int height) CM_OVERRIDE; /** * Returns true if an entry with the given key is in the @@ -67,7 +67,7 @@ public: * exception is during a resize. The optional argument specifies the * string to be displayed in the status bar. */ - virtual void UpdateStatusBar() { this->UpdateStatusBar(0); } + void UpdateStatusBar() CM_OVERRIDE { this->UpdateStatusBar(CM_NULLPTR); } virtual void UpdateStatusBar(const char* message); /** @@ -83,7 +83,7 @@ public: * During a CMake run, an error handle should add errors * to be displayed afterwards. */ - virtual void AddError(const char* message, const char* title); + void AddError(const char* message, const char* title) CM_OVERRIDE; /** * Used to do a configure. If argument is specified, it does only the check diff --git a/Source/CursesDialog/cmCursesOptionsWidget.h b/Source/CursesDialog/cmCursesOptionsWidget.h index a17f2d5..f88b6bc 100644 --- a/Source/CursesDialog/cmCursesOptionsWidget.h +++ b/Source/CursesDialog/cmCursesOptionsWidget.h @@ -25,7 +25,7 @@ public: // Handle user input. Called by the container of this widget // when this widget has focus. Returns true if the input was // handled. - virtual bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w); + bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w) CM_OVERRIDE; void SetOption(const std::string&); void AddOption(std::string const&); void NextOption(); diff --git a/Source/CursesDialog/cmCursesPathWidget.h b/Source/CursesDialog/cmCursesPathWidget.h index 18d298a..cd26df6 100644 --- a/Source/CursesDialog/cmCursesPathWidget.h +++ b/Source/CursesDialog/cmCursesPathWidget.h @@ -23,9 +23,9 @@ public: * This method is called when different keys are pressed. The * subclass can have a special implementation handler for this. */ - virtual void OnTab(cmCursesMainForm* fm, WINDOW* w); - virtual void OnReturn(cmCursesMainForm* fm, WINDOW* w); - virtual void OnType(int& key, cmCursesMainForm* fm, WINDOW* w); + void OnTab(cmCursesMainForm* fm, WINDOW* w) CM_OVERRIDE; + void OnReturn(cmCursesMainForm* fm, WINDOW* w) CM_OVERRIDE; + void OnType(int& key, cmCursesMainForm* fm, WINDOW* w) CM_OVERRIDE; protected: cmCursesPathWidget(const cmCursesPathWidget& from); 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/cmCursesStringWidget.h b/Source/CursesDialog/cmCursesStringWidget.h index fc1b2ba..c8ca482 100644 --- a/Source/CursesDialog/cmCursesStringWidget.h +++ b/Source/CursesDialog/cmCursesStringWidget.h @@ -32,14 +32,14 @@ public: * when this widget has focus. Returns true if the input was * handled. */ - virtual bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w); + bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w) CM_OVERRIDE; /** * Set/Get the string. */ void SetString(const std::string& value); const char* GetString(); - virtual const char* GetValue(); + const char* GetValue() CM_OVERRIDE; /** * Set/Get InEdit flag. Can be used to tell the widget to leave @@ -61,7 +61,7 @@ public: * in the toolbar and return true. Otherwise, return false * and the parent widget will print. */ - virtual bool PrintKeys(); + bool PrintKeys() CM_OVERRIDE; protected: cmCursesStringWidget(const cmCursesStringWidget& from); 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; } } |