]> git.xonotic.org Git - xonotic/netradiant.git/commitdiff
s/nullptr/ui::null/ where appropriate
authorTimePath <andrew.hardaker1995@gmail.com>
Sat, 29 Jul 2017 12:13:23 +0000 (22:13 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Mon, 31 Jul 2017 12:35:48 +0000 (22:35 +1000)
16 files changed:
contrib/gtkgensurf/view.cpp
libs/gtkutil/dialog.cpp
libs/gtkutil/widget.cpp
libs/gtkutil/xorrectangle.cpp
radiant/build.cpp
radiant/entityinspector.cpp
radiant/feedback.h
radiant/findtexturedialog.cpp
radiant/mainframe.cpp
radiant/map.cpp
radiant/patchdialog.cpp
radiant/pluginmenu.cpp
radiant/plugintoolbar.cpp
radiant/surfacedialog.cpp
radiant/texwindow.cpp
radiant/xywindow.cpp

index 65ffc964a06e8c8fdcddf5bcedb87e4cc4e5d231..307ccdc48d8a0ae25dbfa0143efa2d1d08945d6a 100644 (file)
@@ -413,7 +413,7 @@ void CreateViewWindow(){
        spin.connect( "focus_out_event", G_CALLBACK( doublevariable_spinfocusout ), &azimuth );
 #endif
 
-       auto frame = ui::Frame( nullptr );
+       auto frame = ui::Frame(ui::null);
        frame.show();
        gtk_frame_set_shadow_type( GTK_FRAME( frame ), GTK_SHADOW_IN );
        gtk_box_pack_start( GTK_BOX( vbox ), frame, TRUE, TRUE, 0 );
index f87bbeeb39eb25d260992ee5063e8c9b862c0e2e..9e272a1582a1f53f2ac60a096800acd8abd3c7b5 100644 (file)
@@ -180,7 +180,7 @@ RadioHBox RadioHBox_new( StringArrayRange names ){
        gtk_widget_show( GTK_WIDGET( hbox ) );
 
        GSList* group = 0;
-       auto radio = ui::RadioButton{nullptr};
+       auto radio = ui::RadioButton(ui::null);
        for ( StringArrayRange::Iterator i = names.first; i != names.last; ++i )
        {
                radio = ui::RadioButton(GTK_RADIO_BUTTON( gtk_radio_button_new_with_label( group, *i ) ));
index be5f63d4f124e6c4f88b493d63a762c5b3cd5898..579ade807641312fddf03fdd4ddfcf01c9837104 100644 (file)
@@ -35,7 +35,7 @@ gboolean ToggleShown::notify_visible(ui::Widget widget, gpointer dummy, ToggleSh
 gboolean ToggleShown::destroy(ui::Widget widget, ToggleShown *self)
 {
     self->m_shownDeferred = gtk_widget_get_visible(self->m_widget) != FALSE;
-    self->m_widget = ui::Widget(nullptr);
+    self->m_widget = ui::Widget(ui::null);
     return FALSE;
 }
 
index d9108b66880f3b838ee128ede8f6a7f8e33bb4a1..c638e0e21fcaa61ffd01d77da3f7ef32c5942d98 100644 (file)
@@ -4,7 +4,7 @@
 
 bool XORRectangle::initialised() const
 {
-    return cr != nullptr;
+    return !!cr;
 }
 
 void XORRectangle::lazy_init()
index 1a2efe25d9f07bbdf38a3695abfb9ef4fee9650b..05ca56456aee56b86bc0aede5000fbe4bbb7bb59 100644 (file)
@@ -663,7 +663,7 @@ class ProjectList
 {
 public:
 Project& m_project;
-ui::ListStore m_store{nullptr};
+ui::ListStore m_store{ui::null};
 bool m_changed;
 ProjectList( Project& project ) : m_project( project ), m_changed( false ){
 }
@@ -993,7 +993,7 @@ typedef std::list<BuildMenuItem> BuildMenuItems;
 BuildMenuItems g_BuildMenuItems;
 
 
-ui::Menu g_bsp_menu{nullptr};
+ui::Menu g_bsp_menu{ui::null};
 
 void Build_constructMenu( ui::Menu menu ){
        for ( Project::iterator i = g_build_project.begin(); i != g_build_project.end(); ++i )
index 701a77baccc66738eaeaaf188679cbd6d6bbecdc..82c0bb5f96533254b2c9c32480186a1e5876a222 100644 (file)
@@ -165,7 +165,7 @@ NonModalEntry m_nonModal;
 public:
 StringAttribute( const char* key ) :
        m_key( key ),
-       m_entry( nullptr ),
+       m_entry( ui::null ),
        m_nonModal( ApplyCaller( *this ), UpdateCaller( *this ) ){
        auto entry = ui::Entry();
        entry.show();
@@ -324,7 +324,7 @@ NonModalEntry m_nonModal;
 public:
 AngleAttribute( const char* key ) :
        m_key( key ),
-       m_entry( nullptr ),
+       m_entry( ui::null ),
        m_nonModal( ApplyCaller( *this ), UpdateCaller( *this ) ){
        auto entry = numeric_entry_new();
        m_entry = entry;
@@ -371,11 +371,11 @@ ui::Entry m_entry;
 NonModalEntry m_nonModal;
 RadioHBox m_radio;
 NonModalRadio m_nonModalRadio;
-ui::HBox m_hbox{nullptr};
+ui::HBox m_hbox{ui::null};
 public:
 DirectionAttribute( const char* key ) :
        m_key( key ),
-       m_entry( nullptr ),
+       m_entry( ui::null ),
        m_nonModal( ApplyCaller( *this ), UpdateCaller( *this ) ),
        m_radio( RadioHBox_new( STRING_ARRAY_RANGE( buttons ) ) ),
        m_nonModalRadio( ApplyRadioCaller( *this ) ){
@@ -456,7 +456,7 @@ public:
 ui::Entry m_roll;
 ui::Entry m_pitch;
 ui::Entry m_yaw;
-AnglesEntry() : m_roll( nullptr ), m_pitch( nullptr ), m_yaw( nullptr ){
+AnglesEntry() : m_roll( ui::null ), m_pitch( ui::null ), m_yaw( ui::null ){
 }
 };
 
@@ -546,7 +546,7 @@ public:
 ui::Entry m_x;
 ui::Entry m_y;
 ui::Entry m_z;
-Vector3Entry() : m_x( nullptr ), m_y( nullptr ), m_z( nullptr ){
+Vector3Entry() : m_x( ui::null ), m_y( ui::null ), m_z( ui::null ){
 }
 };
 
@@ -555,7 +555,7 @@ class Vector3Attribute : public EntityAttribute
 CopiedString m_key;
 Vector3Entry m_vector3;
 NonModalEntry m_nonModal;
-ui::Box m_hbox{nullptr};
+ui::Box m_hbox{ui::null};
 public:
 Vector3Attribute( const char* key ) :
        m_key( key ),
@@ -717,8 +717,8 @@ GtkCheckButton* g_entitySpawnflagsCheck[MAX_FLAGS];
 GtkEntry* g_entityKeyEntry;
 GtkEntry* g_entityValueEntry;
 
-ui::ListStore g_entlist_store{nullptr};
-ui::ListStore g_entprops_store{nullptr};
+ui::ListStore g_entlist_store{ui::null};
+ui::ListStore g_entprops_store{ui::null};
 const EntityClass* g_current_flags = 0;
 const EntityClass* g_current_comment = 0;
 const EntityClass* g_current_attributes = 0;
@@ -731,7 +731,7 @@ int spawn_table[MAX_FLAGS];
 // the table is a 4x4 in which we need to put the comment box g_entityClassComment and the spawn flags..
 GtkTable* g_spawnflagsTable;
 
-ui::VBox g_attributeBox{nullptr};
+ui::VBox g_attributeBox{ui::null};
 typedef std::vector<EntityAttribute*> EntityAttributes;
 EntityAttributes g_entityAttributes;
 }
index 42fdbbb3a855720a13bbaa85051c5ab02cde3cb4..db7f0da42e1b545f8e45ccdd37bf20cbd461c916 100644 (file)
@@ -148,7 +148,7 @@ class CDbgDlg : public Dialog
 {
 GPtrArray *m_pFeedbackElements;
 // the list widget we use in the dialog
-ui::ListStore m_clist{nullptr};
+ui::ListStore m_clist{ui::null};
 ISAXHandler *m_pHighlight;
 IGL2DWindow* m_pDraw2D;
 public:
index e1879ea3876d3585ce0271e30510bfca1b70c44a..9766843a0f086392c488f48690b2c913b1e17930 100644 (file)
@@ -130,7 +130,7 @@ FindTextureDialog::~FindTextureDialog(){
 ui::Window FindTextureDialog::BuildDialog(){
        ui::Widget vbox, hbox, table, label;
        ui::Widget button;
-       ui::Entry entry{nullptr};
+       ui::Entry entry{ui::null};
 
        auto dlg = ui::Window(create_floating_window( "Find / Replace Texture(s)", m_parent ));
 
index d38525a913c6f100ff908fd84d4210861f454d59..8d652ef2fa25ffdf3102cde25d91475cd0f04d3d 100644 (file)
@@ -1610,7 +1610,7 @@ class WaitDialog
 {
 public:
 ui::Window m_window{ui::null};
-ui::Label m_label{(GtkLabel *) nullptr};
+ui::Label m_label{ui::null};
 };
 
 WaitDialog create_wait_dialog( const char* title, const char* text ){
index c767cc2e4e0ba10babbbc12c43ebcae7bce1d385..056f3ecfb04ae1c6db67030f84b9d2c3c3d78e5d 100644 (file)
@@ -765,7 +765,7 @@ void DoMapInfo(){
        ModalDialog dialog;
        GtkEntry* brushes_entry;
        GtkEntry* entities_entry;
-       ui::ListStore EntityBreakdownWalker{nullptr};
+       ui::ListStore EntityBreakdownWalker{ui::null};
 
        ui::Window window = MainFrame_getWindow().create_dialog_window("Map Info", G_CALLBACK(dialog_delete_callback ), &dialog );
 
index 70cf3f8c6b4904ec7fab6e7bb6ea1cd739482011..96e60eac73ecd3e2c77defc0cb46f123043f9c72 100644 (file)
@@ -160,7 +160,7 @@ public:
 ui::CheckButton m_enabled;
 ui::Entry m_horizontal;
 ui::Entry m_vertical;
-Subdivisions() : m_enabled( (GtkCheckButton *) 0 ), m_horizontal( nullptr ), m_vertical( nullptr ){
+Subdivisions() : m_enabled( (GtkCheckButton *) 0 ), m_horizontal( ui::null ), m_vertical( ui::null ){
 }
 void update(){
        PatchFixedSubdivisions subdivisions;
@@ -226,8 +226,8 @@ float m_fZ;
    float       m_fVShift; */
 int m_nCol;
 int m_nRow;
-ui::ComboBoxText m_pRowCombo{nullptr};
-ui::ComboBoxText m_pColCombo{nullptr};
+ui::ComboBoxText m_pRowCombo{ui::null};
+ui::ComboBoxText m_pColCombo{ui::null};
 std::size_t m_countRows;
 std::size_t m_countCols;
 
index d463aea73c88221468cb90e1f6545be9f3d2887b..e2af3b97100d8e584a0415813f51959b80da8332 100644 (file)
@@ -44,7 +44,7 @@ void plugin_activated( ui::Widget widget, gpointer data ){
 
 void PlugInMenu_Add( ui::Menu plugin_menu, IPlugIn* pPlugIn ){
        ui::Widget item, parent;
-       ui::Menu menu{nullptr}, subMenu{nullptr};
+       ui::Menu menu{ui::null}, subMenu{ui::null};
        const char *menuText, *menuCommand;
        std::stack<ui::Menu> menuStack;
 
index 66deb284c34af1e8bf8e2ace751af00ead0de2d2..32b31c5a382ba753b2999f2ed70cdd0111854d93 100644 (file)
@@ -91,7 +91,7 @@ void PlugInToolbar_AddButton( ui::Toolbar toolbar, const IToolbarButton* button
        toolbar_insert( toolbar, button->getImage(), button->getText(), button->getTooltip(), button->getType(), G_CALLBACK( ActivateToolbarButton ), reinterpret_cast<gpointer>( const_cast<IToolbarButton*>( button ) ) );
 }
 
-ui::Toolbar g_plugin_toolbar{nullptr};
+ui::Toolbar g_plugin_toolbar{ui::null};
 
 void PluginToolbar_populate(){
        class AddToolbarItemVisitor : public ToolbarModules::Visitor
index 64ab34aad7251cb84f939966335b742f084b40e8..f97745598e2c551174ca5ea4321368f6d9614056 100644 (file)
@@ -122,7 +122,7 @@ float& m_f;
 public:
 GtkSpinButton* m_spin;
 ui::Entry m_entry;
-Increment( float& f ) : m_f( f ), m_spin( 0 ), m_entry( nullptr ){
+Increment( float& f ) : m_f( f ), m_spin( 0 ), m_entry( ui::null ){
 }
 void cancel(){
        entry_set_float( m_entry, m_f );
@@ -159,7 +159,7 @@ GtkCheckButton* m_surfaceFlags[32];
 GtkCheckButton* m_contentFlags[32];
 
 NonModalEntry m_valueEntry;
-ui::Entry m_valueEntryWidget{nullptr};
+ui::Entry m_valueEntryWidget{ui::null};
 public:
 WindowPositionTracker m_positionTracker;
 WindowPositionTrackerImportStringCaller m_importPosition;
index 1a927a51cf12206273e335012155847c2912cf3a..7d1782eca9c9e1ebb1dd4460f5574442f218e2c0 100644 (file)
@@ -262,8 +262,8 @@ ui::Widget m_texture_scroll;
 ui::Widget m_treeViewTree;
 ui::Widget m_treeViewTags;
 ui::Frame m_tag_frame{ui::null};
-ui::ListStore m_assigned_store{nullptr};
-ui::ListStore m_available_store{nullptr};
+ui::ListStore m_assigned_store{ui::null};
+ui::ListStore m_available_store{ui::null};
 ui::Widget m_assigned_tree;
 ui::Widget m_available_tree;
 ui::Widget m_scr_win_tree;
@@ -273,7 +273,7 @@ ui::Button m_search_button{ui::null};
 ui::Widget m_shader_info_item;
 
 std::set<CopiedString> m_all_tags;
-ui::ListStore m_all_tags_list{nullptr};
+ui::ListStore m_all_tags_list{ui::null};
 std::vector<CopiedString> m_copied_tags;
 std::set<CopiedString> m_found_shaders;
 
index 5db4bf1d9e63d6855477af37ceb6643bc42d3aef..eb275baf0cabf37c778ed35c9f7978de9b8a6a9b 100644 (file)
@@ -538,7 +538,7 @@ VIEWTYPE GlobalXYWnd_getCurrentViewType(){
 
 bool g_bCrossHairs = false;
 
-ui::Menu XYWnd::m_mnuDrop{nullptr};
+ui::Menu XYWnd::m_mnuDrop(ui::null);
 
 // this is disabled, and broken
 // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=394
@@ -820,7 +820,7 @@ XYWnd::XYWnd() :
 
        m_entityCreate = false;
 
-       m_mnuDrop = ui::Menu{nullptr};
+       m_mnuDrop = ui::Menu(ui::null);
 
        GlobalWindowObservers_add( m_window_observer );
        GlobalWindowObservers_connectWidget( m_gl_widget );
@@ -861,7 +861,7 @@ XYWnd::~XYWnd(){
 
        if ( m_mnuDrop ) {
                gtk_widget_destroy( GTK_WIDGET( m_mnuDrop ) );
-               m_mnuDrop = ui::Menu{nullptr};
+               m_mnuDrop = ui::Menu(ui::null);
        }
 
        g_signal_handler_disconnect( G_OBJECT( m_gl_widget ), m_sizeHandler );
@@ -2570,7 +2570,7 @@ void unrealise(){
        if ( ++m_unrealised == 1 ) {
                if ( XYWnd::m_mnuDrop ) {
                        gtk_widget_destroy( GTK_WIDGET( XYWnd::m_mnuDrop ) );
-                       XYWnd::m_mnuDrop = ui::Menu(nullptr);
+                       XYWnd::m_mnuDrop = ui::Menu(ui::null);
                }
        }
 }