mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	code cleanup: use nullptr in C++ files
Using 0 or NULL are C idioms. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									17a6f28827
								
							
						
					
					
						commit
						2d6633eee0
					
				
					 1 changed files with 8 additions and 8 deletions
				
			
		|  | @ -103,7 +103,7 @@ extern "C" int updateProgress(const char *text) | ||||||
| 	return progressDialogCanceled; | 	return progressDialogCanceled; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| MainWindow *MainWindow::m_Instance = NULL; | MainWindow *MainWindow::m_Instance = nullptr; | ||||||
| 
 | 
 | ||||||
| extern "C" void showErrorFromC(char *buf) | extern "C" void showErrorFromC(char *buf) | ||||||
| { | { | ||||||
|  | @ -113,14 +113,14 @@ extern "C" void showErrorFromC(char *buf) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| MainWindow::MainWindow() : QMainWindow(), | MainWindow::MainWindow() : QMainWindow(), | ||||||
| 	actionNextDive(0), | 	actionNextDive(nullptr), | ||||||
| 	actionPreviousDive(0), | 	actionPreviousDive(nullptr), | ||||||
| #ifndef NO_USERMANUAL | #ifndef NO_USERMANUAL | ||||||
| 	helpView(0), | 	helpView(0), | ||||||
| #endif | #endif | ||||||
| 	state(VIEWALL), | 	state(VIEWALL), | ||||||
| 	survey(0), | 	survey(nullptr), | ||||||
| 	findMovedImagesDialog(0) | 	findMovedImagesDialog(nullptr) | ||||||
| { | { | ||||||
| 	Q_ASSERT_X(m_Instance == NULL, "MainWindow", "MainWindow recreated!"); | 	Q_ASSERT_X(m_Instance == NULL, "MainWindow", "MainWindow recreated!"); | ||||||
| 	m_Instance = this; | 	m_Instance = this; | ||||||
|  | @ -376,7 +376,7 @@ MainWindow::MainWindow() : QMainWindow(), | ||||||
| MainWindow::~MainWindow() | MainWindow::~MainWindow() | ||||||
| { | { | ||||||
| 	write_hashes(); | 	write_hashes(); | ||||||
| 	m_Instance = NULL; | 	m_Instance = nullptr; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void MainWindow::setupSocialNetworkMenu() | void MainWindow::setupSocialNetworkMenu() | ||||||
|  | @ -743,7 +743,7 @@ void MainWindow::closeCurrentFile() | ||||||
| 	/* free the dives and trips */ | 	/* free the dives and trips */ | ||||||
| 	clear_git_id(); | 	clear_git_id(); | ||||||
| 	clear_dive_file_data(); | 	clear_dive_file_data(); | ||||||
| 	setCurrentFile(NULL); | 	setCurrentFile(nullptr); | ||||||
| 	cleanUpEmpty(); | 	cleanUpEmpty(); | ||||||
| 	mark_divelist_changed(false); | 	mark_divelist_changed(false); | ||||||
| 
 | 
 | ||||||
|  | @ -2030,7 +2030,7 @@ void MainWindow::hideProgressBar() | ||||||
| 	if (progressDialog) { | 	if (progressDialog) { | ||||||
| 		progressDialog->setValue(100); | 		progressDialog->setValue(100); | ||||||
| 		delete progressDialog; | 		delete progressDialog; | ||||||
| 		progressDialog = NULL; | 		progressDialog = nullptr; | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue