Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
f421b68a
Commit
f421b68a
authored
Sep 25, 2015
by
Davis King
Browse files
merged
parents
9b56dc35
86614971
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
18 deletions
+49
-18
dlib/algs.h
dlib/algs.h
+3
-0
dlib/general_hash/random_hashing.h
dlib/general_hash/random_hashing.h
+2
-2
dlib/gui_widgets/drawable.cpp
dlib/gui_widgets/drawable.cpp
+15
-5
dlib/matrix/matrix.h
dlib/matrix/matrix.h
+1
-1
dlib/threads/multithreaded_object_extension.cpp
dlib/threads/multithreaded_object_extension.cpp
+14
-5
dlib/threads/threaded_object_extension.cpp
dlib/threads/threaded_object_extension.cpp
+14
-5
No files found.
dlib/algs.h
View file @
f421b68a
...
...
@@ -43,6 +43,9 @@
// This warning happens often in generic code that works with functions and isn't useful.
#pragma warning(disable : 4180)
// Disable "warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)"
#pragma warning(disable : 4290)
#endif
#ifdef __BORLANDC__
...
...
dlib/general_hash/random_hashing.h
View file @
f421b68a
...
...
@@ -35,7 +35,7 @@ namespace dlib
const
static
unsigned
int
max
=
4096
;
const
static
float
logvals
[
max
]
=
{
const
static
double
logvals
[
max
]
=
{
4.079
,
3.905
,
3.8
,
3.723
,
3.663
,
3.613
,
3.57
,
3.532
,
3.499
,
3.468
,
3.441
,
3.416
,
3.392
,
3.37
,
3.35
,
3.33
,
3.312
,
3.295
,
3.278
,
3.263
,
3.248
,
3.233
,
3.219
,
3.206
,
3.193
,
3.181
,
3.169
,
3.158
,
3.147
,
3.136
,
...
...
@@ -447,7 +447,7 @@ namespace dlib
0.08566
,
0.08275
,
0.07974
,
0.0766
,
0.07334
,
0.06992
,
0.06633
,
0.06253
,
0.05849
,
0.05415
,
0.04943
,
0.0442
,
0.03828
,
0.03125
,
0.0221
,
-
0
};
const
static
float
cosvals
[
max
]
=
{
const
static
double
cosvals
[
max
]
=
{
1
,
1
,
1
,
1
,
1
,
1
,
0.9999
,
0.9999
,
0.9999
,
0.9999
,
0.9999
,
0.9998
,
0.9998
,
0.9998
,
0.9997
,
0.9997
,
0.9997
,
0.9996
,
0.9996
,
0.9995
,
0.9995
,
0.9994
,
0.9994
,
0.9993
,
0.9993
,
0.9992
,
0.9991
,
0.9991
,
0.999
,
0.9989
,
...
...
dlib/gui_widgets/drawable.cpp
View file @
f421b68a
...
...
@@ -6,6 +6,7 @@
#include "drawable.h"
#include <algorithm>
#include <iostream>
namespace
dlib
{
...
...
@@ -518,11 +519,20 @@ namespace dlib
~
drawable
(
)
{
DLIB_ASSERT
(
events_are_enabled
()
==
false
,
"
\t
drawable::~drawable()"
<<
"
\n\t
You must disable events for drawable objects in their destructor by calling disable_events()."
<<
"
\n\t
this: "
<<
this
);
try
{
DLIB_ASSERT
(
events_are_enabled
()
==
false
,
"
\t
drawable::~drawable()"
<<
"
\n\t
You must disable events for drawable objects in their destructor by calling disable_events()."
<<
"
\n\t
this: "
<<
this
);
}
catch
(
std
::
exception
&
e
)
{
std
::
cerr
<<
e
.
what
()
<<
std
::
endl
;
assert
(
false
);
abort
();
}
disable_events
();
}
...
...
dlib/matrix/matrix.h
View file @
f421b68a
...
...
@@ -1621,7 +1621,7 @@ namespace dlib
literal_assign_helper
(
const
literal_assign_helper
&
item
)
:
m
(
item
.
m
),
r
(
item
.
r
),
c
(
item
.
c
),
has_been_used
(
false
)
{}
explicit
literal_assign_helper
(
matrix
*
m_
)
:
m
(
m_
),
r
(
0
),
c
(
0
),
has_been_used
(
false
)
{
next
();}
~
literal_assign_helper
()
~
literal_assign_helper
()
throw
(
std
::
exception
)
{
DLIB_CASSERT
(
!
has_been_used
||
r
==
m
->
nr
(),
"You have used the matrix comma based assignment incorrectly by failing to
\n
"
...
...
dlib/threads/multithreaded_object_extension.cpp
View file @
f421b68a
...
...
@@ -28,11 +28,20 @@ namespace dlib
~
multithreaded_object
(
)
{
DLIB_ASSERT
(
number_of_threads_alive
()
==
0
,
"
\t
multithreaded_object::~multithreaded_object()"
<<
"
\n\t
You have let a multithreaded object destruct itself before terminating its threads"
<<
"
\n\t
this: "
<<
this
);
try
{
DLIB_ASSERT
(
number_of_threads_alive
()
==
0
,
"
\t
multithreaded_object::~multithreaded_object()"
<<
"
\n\t
You have let a multithreaded object destruct itself before terminating its threads"
<<
"
\n\t
this: "
<<
this
);
}
catch
(
std
::
exception
&
e
)
{
std
::
cerr
<<
e
.
what
()
<<
std
::
endl
;
assert
(
false
);
abort
();
}
}
// ----------------------------------------------------------------------------------------
...
...
dlib/threads/threaded_object_extension.cpp
View file @
f421b68a
...
...
@@ -29,11 +29,20 @@ namespace dlib
~
threaded_object
(
)
{
DLIB_ASSERT
(
is_alive
()
==
false
,
"
\t
threaded_object::~threaded_object()"
<<
"
\n\t
You have let a threaded object destruct itself before terminating its thread"
<<
"
\n\t
this: "
<<
this
);
try
{
DLIB_ASSERT
(
is_alive
()
==
false
,
"
\t
threaded_object::~threaded_object()"
<<
"
\n\t
You have let a threaded object destruct itself before terminating its thread"
<<
"
\n\t
this: "
<<
this
);
}
catch
(
std
::
exception
&
e
)
{
std
::
cerr
<<
e
.
what
()
<<
std
::
endl
;
assert
(
false
);
abort
();
}
}
// ----------------------------------------------------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment