Commit 76eaef5d authored by Davis King's avatar Davis King

Minor changes to avoid compile time errors when using visual studio 10.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403805
parent 675ba8e4
...@@ -122,7 +122,7 @@ int main() ...@@ -122,7 +122,7 @@ int main()
// create a thread that will start the server. The ref() here allows us to pass // create a thread that will start the server. The ref() here allows us to pass
// our_web_server into the threaded function by reference. // our_web_server into the threaded function by reference.
thread_function t(thread, ref(our_web_server)); thread_function t(thread, dlib::ref(our_web_server));
cout << "Press enter to end this program" << endl; cout << "Press enter to end this program" << endl;
cin.get(); cin.get();
......
...@@ -74,7 +74,7 @@ int main() ...@@ -74,7 +74,7 @@ int main()
// create a thread that will start the server. The ref() here allows us to pass // create a thread that will start the server. The ref() here allows us to pass
// our_server into the threaded function by reference. // our_server into the threaded function by reference.
thread_function t(thread, ref(our_server)); thread_function t(thread, dlib::ref(our_server));
cout << "Press enter to end this program" << endl; cout << "Press enter to end this program" << endl;
cin.get(); cin.get();
......
...@@ -100,7 +100,7 @@ int main() ...@@ -100,7 +100,7 @@ int main()
// create a thread that will start the server. The ref() here allows us to pass // create a thread that will start the server. The ref() here allows us to pass
// our_server into the threaded function by reference. // our_server into the threaded function by reference.
thread_function t(thread, ref(our_server)); thread_function t(thread, dlib::ref(our_server));
cout << "Press enter to end this program" << endl; cout << "Press enter to end this program" << endl;
cin.get(); cin.get();
......
...@@ -56,7 +56,7 @@ int main() ...@@ -56,7 +56,7 @@ int main()
// to a thread by reference. For example, the thread below adds // to a thread by reference. For example, the thread below adds
// one to val. // one to val.
double val = 2; double val = 2;
thread_function t4(thread_increment, ref(val)); thread_function t4(thread_increment, dlib::ref(val));
t4.wait(); // wait for t4 to finish before printing val. t4.wait(); // wait for t4 to finish before printing val.
// Print val. It will now have a value of 3. // Print val. It will now have a value of 3.
cout << "val: " << val << endl; cout << "val: " << val << endl;
......
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