Commit d200a684 authored by Davis King's avatar Davis King

Removed the constructor try/catch blocks from the gui examples

since they don't always compile in visual studio 7.1 and they
would probably confuse most people anyway.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402651
parent 3cd43a2c
...@@ -171,7 +171,7 @@ int WINAPI WinMain (HINSTANCE, HINSTANCE, PSTR cmds, int) ...@@ -171,7 +171,7 @@ int WINAPI WinMain (HINSTANCE, HINSTANCE, PSTR cmds, int)
main_window:: main_window::
main_window( main_window(
) try : ) :
color_non_evidence(0,0,0), color_non_evidence(0,0,0),
color_default_bg(255,255,255), color_default_bg(255,255,255),
color_evidence(100,200,100), color_evidence(100,200,100),
...@@ -261,7 +261,7 @@ main_window( ...@@ -261,7 +261,7 @@ main_window(
// to all arrange themselves correctly in our window. // to all arrange themselves correctly in our window.
no_node_selected(); no_node_selected();
on_window_resized(); on_window_resized();
} catch (...) { close_window(); } // make sure close_window() is called if something throws }
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
......
...@@ -100,7 +100,7 @@ class win : public drawable_window ...@@ -100,7 +100,7 @@ class win : public drawable_window
*/ */
public: public:
win( win(
) try : ) :
c(*this), c(*this),
b(*this), b(*this),
cb(*this,rectangle(100,100,200,200),0,0,255), // the color_box will be blue and 101 pixels wide and tall cb(*this,rectangle(100,100,200,200),0,0,255), // the color_box will be blue and 101 pixels wide and tall
...@@ -144,7 +144,7 @@ public: ...@@ -144,7 +144,7 @@ public:
set_title("dlib gui example"); set_title("dlib gui example");
show(); show();
} catch (...) { close_window(); } // make sure close window is called if something throws }
~win( ~win(
) )
......
...@@ -33,7 +33,7 @@ public: ...@@ -33,7 +33,7 @@ public:
template <typename image_type> template <typename image_type>
win( win(
const image_type& img const image_type& img
) try : ) :
gui_img(*this) gui_img(*this)
{ {
// set the size of this window to match the size of the input image // set the size of this window to match the size of the input image
...@@ -46,7 +46,7 @@ public: ...@@ -46,7 +46,7 @@ public:
// show this window on the screen // show this window on the screen
show(); show();
} catch (...) { close_window(); } // make sure close_window() is called if something throws }
~win( ~win(
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment