Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
86614971
Commit
86614971
authored
Sep 25, 2015
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bunch of warnings in visual studio 2015.
parent
16ea6f11
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
18 deletions
+49
-18
algs.h
dlib/algs.h
+3
-0
random_hashing.h
dlib/general_hash/random_hashing.h
+2
-2
drawable.cpp
dlib/gui_widgets/drawable.cpp
+15
-5
matrix.h
dlib/matrix/matrix.h
+1
-1
multithreaded_object_extension.cpp
dlib/threads/multithreaded_object_extension.cpp
+14
-5
threaded_object_extension.cpp
dlib/threads/threaded_object_extension.cpp
+14
-5
No files found.
dlib/algs.h
View file @
86614971
...
@@ -43,6 +43,9 @@
...
@@ -43,6 +43,9 @@
// This warning happens often in generic code that works with functions and isn't useful.
// This warning happens often in generic code that works with functions and isn't useful.
#pragma warning(disable : 4180)
#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
#endif
#ifdef __BORLANDC__
#ifdef __BORLANDC__
...
...
dlib/general_hash/random_hashing.h
View file @
86614971
...
@@ -35,7 +35,7 @@ namespace dlib
...
@@ -35,7 +35,7 @@ namespace dlib
const
static
unsigned
int
max
=
4096
;
const
static
unsigned
int
max
=
4096
;
const
static
float
logvals
[
max
]
=
{
const
static
double
logvals
[
max
]
=
{
4
.
07
9
,
3
.
905
,
3
.
8
,
3
.
723
,
3
.
663
,
3
.
613
,
3
.
57
,
3
.
532
,
3
.
499
,
3
.
468
,
4
.
07
9
,
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
.
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
,
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
...
@@ -447,7 +447,7 @@ namespace dlib
0
.
08566
,
0
.
08275
,
0
.
07
974
,
0
.
0766
,
0
.
07334
,
0
.
06
992
,
0
.
06633
,
0
.
06253
,
0
.
05
849
,
0
.
05415
,
0
.
08566
,
0
.
08275
,
0
.
07
974
,
0
.
0766
,
0
.
07334
,
0
.
06
992
,
0
.
06633
,
0
.
06253
,
0
.
05
849
,
0
.
05415
,
0
.
04
943
,
0
.
0442
,
0
.
03
828
,
0
.
03125
,
0
.
0221
,
-
0
};
0
.
04
943
,
0
.
0442
,
0
.
03
828
,
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
,
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
.
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
,
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 @
86614971
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
#include "drawable.h"
#include "drawable.h"
#include <algorithm>
#include <algorithm>
#include <iostream>
namespace
dlib
namespace
dlib
{
{
...
@@ -518,11 +519,20 @@ namespace dlib
...
@@ -518,11 +519,20 @@ namespace dlib
~
drawable
(
~
drawable
(
)
)
{
{
DLIB_ASSERT
(
events_are_enabled
()
==
false
,
try
"
\t
drawable::~drawable()"
{
<<
"
\n\t
You must disable events for drawable objects in their destructor by calling disable_events()."
DLIB_ASSERT
(
events_are_enabled
()
==
false
,
<<
"
\n\t
this: "
<<
this
"
\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
();
disable_events
();
}
}
...
...
dlib/matrix/matrix.h
View file @
86614971
...
@@ -1605,7 +1605,7 @@ namespace dlib
...
@@ -1605,7 +1605,7 @@ namespace dlib
literal_assign_helper
(
const
literal_assign_helper
&
item
)
:
m
(
item
.
m
),
r
(
item
.
r
),
c
(
item
.
c
),
has_been_used
(
false
)
{}
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
();}
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
(),
DLIB_CASSERT
(
!
has_been_used
||
r
==
m
->
nr
(),
"You have used the matrix comma based assignment incorrectly by failing to
\n
"
"You have used the matrix comma based assignment incorrectly by failing to
\n
"
...
...
dlib/threads/multithreaded_object_extension.cpp
View file @
86614971
...
@@ -28,11 +28,20 @@ namespace dlib
...
@@ -28,11 +28,20 @@ namespace dlib
~
multithreaded_object
(
~
multithreaded_object
(
)
)
{
{
DLIB_ASSERT
(
number_of_threads_alive
()
==
0
,
try
"
\t
multithreaded_object::~multithreaded_object()"
{
<<
"
\n\t
You have let a multithreaded object destruct itself before terminating its threads"
DLIB_ASSERT
(
number_of_threads_alive
()
==
0
,
<<
"
\n\t
this: "
<<
this
"
\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 @
86614971
...
@@ -29,11 +29,20 @@ namespace dlib
...
@@ -29,11 +29,20 @@ namespace dlib
~
threaded_object
(
~
threaded_object
(
)
)
{
{
DLIB_ASSERT
(
is_alive
()
==
false
,
try
"
\t
threaded_object::~threaded_object()"
{
<<
"
\n\t
You have let a threaded object destruct itself before terminating its thread"
DLIB_ASSERT
(
is_alive
()
==
false
,
<<
"
\n\t
this: "
<<
this
"
\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