changed ASSERT_MESSAGE and ERROR_MESSAGE macros to use proper
do{}while(0) encapsulation to protect them when used in an if block
without {}
previously they used else to consume the trailing ; but this
could just as easily consume any other following statement
(very dangerous in concept, but no damage done in this case)
this causes no change whatsoever in release builds
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@152 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
@@ -378,14 +378,14 @@ Dialog::~Dialog()
|
||||
|
||||
void Dialog::ShowDlg()
|
||||
{
|
||||
ASSERT_MESSAGE(m_window != 0, "dialog was not constructed")
|
||||
ASSERT_MESSAGE(m_window != 0, "dialog was not constructed");
|
||||
importData();
|
||||
gtk_widget_show(GTK_WIDGET(m_window));
|
||||
}
|
||||
|
||||
void Dialog::HideDlg()
|
||||
{
|
||||
ASSERT_MESSAGE(m_window != 0, "dialog was not constructed")
|
||||
ASSERT_MESSAGE(m_window != 0, "dialog was not constructed");
|
||||
exportData();
|
||||
gtk_widget_hide(GTK_WIDGET(m_window));
|
||||
}
|
||||
@@ -399,7 +399,7 @@ static gint delete_event_callback(GtkWidget *widget, GdkEvent* event, gpointer d
|
||||
|
||||
void Dialog::Create()
|
||||
{
|
||||
ASSERT_MESSAGE(m_window == 0, "dialog cannot be constructed")
|
||||
ASSERT_MESSAGE(m_window == 0, "dialog cannot be constructed");
|
||||
|
||||
m_window = BuildDialog();
|
||||
g_signal_connect(G_OBJECT(m_window), "delete_event", G_CALLBACK(delete_event_callback), this);
|
||||
|
||||
Reference in New Issue
Block a user