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
0aa8b4cb
"examples/sampling/vscode:/vscode.git/clone" did not exist on "6178897d3ceb6967de3c03ea04e0d902ebdb3f0a"
Unverified
Commit
0aa8b4cb
authored
Apr 13, 2022
by
Juha Reunanen
Committed by
GitHub
Apr 12, 2022
Browse files
Treat warnings as errors (#2490)
parent
49314c12
Changes
27
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
36 additions
and
18 deletions
+36
-18
dlib/test/geometry.cpp
dlib/test/geometry.cpp
+13
-0
dlib/test/gui/main.cpp
dlib/test/gui/main.cpp
+0
-2
dlib/test/invoke.cpp
dlib/test/invoke.cpp
+3
-0
dlib/unordered_pair.h
dlib/unordered_pair.h
+8
-0
examples/dnn_instance_segmentation_train_ex.cpp
examples/dnn_instance_segmentation_train_ex.cpp
+7
-11
examples/object_detector_advanced_ex.cpp
examples/object_detector_advanced_ex.cpp
+1
-1
examples/server_iostream_ex.cpp
examples/server_iostream_ex.cpp
+4
-4
No files found.
dlib/test/geometry.cpp
View file @
0aa8b4cb
...
...
@@ -367,6 +367,19 @@ namespace
}
}
{
const
rectangle
input
(
1
,
1
,
6
,
4
);
const
rectangle
output
=
set_rect_area
(
input
,
4
*
input
.
area
());
DLIB_TEST
(
output
.
area
()
==
4
*
input
.
area
());
DLIB_TEST
(
output
.
width
()
==
2
*
input
.
width
());
DLIB_TEST
(
output
.
height
()
==
2
*
input
.
height
());
const
auto
input_center
=
center
(
input
);
const
auto
output_center
=
center
(
output
);
DLIB_TEST
(
std
::
abs
(
input_center
.
x
()
-
output_center
.
x
())
<=
1
);
DLIB_TEST
(
std
::
abs
(
input_center
.
y
()
-
output_center
.
y
())
<=
1
);
}
}
// ----------------------------------------------------------------------------------------
...
...
dlib/test/gui/main.cpp
View file @
0aa8b4cb
...
...
@@ -411,7 +411,6 @@ public:
group1
(
*
this
),
group2
(
*
this
),
group3
(
*
this
),
keyboard_count
(
1
),
keydown
(
*
this
),
keyup
(
*
this
),
l1
(
*
this
),
...
...
@@ -759,7 +758,6 @@ private:
widget_group
group1
;
widget_group
group2
;
widget_group
group3
;
int
keyboard_count
;
label
keydown
;
label
keyup
;
label
l1
;
...
...
dlib/test/invoke.cpp
View file @
0aa8b4cb
...
...
@@ -323,6 +323,9 @@ namespace
static_assert
(
dlib
::
invoke
(
multiply_ints
,
2
,
5
)
==
10
,
"this should be constexpr"
);
static_assert
(
dlib
::
invoke_r
<
long
>
(
multiply_ints
,
2
,
5
)
==
10
,
"this should be constexpr"
);
constexpr
constexpr_object
constexpr_obj
;
#if defined (_MSC_VER)
constexpr_obj
;
// avoid warning C4101: 'constexpr_obj': unreferenced local variable
#endif
static_assert
(
dlib
::
invoke
(
&
constexpr_object
::
multiply_ints
,
constexpr_obj
,
2
,
5
)
==
10
,
"this should be constexpr"
);
static_assert
(
dlib
::
invoke_r
<
long
>
(
&
constexpr_object
::
multiply_ints
,
constexpr_obj
,
2
,
5
)
==
10
,
"this should be constexpr"
);
}
...
...
dlib/unordered_pair.h
View file @
0aa8b4cb
...
...
@@ -65,6 +65,14 @@ namespace dlib
- #first and #second contain copies of the items a and b.
!*/
{}
unordered_pair
(
const
unordered_pair
&
p
)
=
default
;
/*!
ensures
- #*this is a copy of p
!*/
template
<
typename
U
>
unordered_pair
(
const
unordered_pair
<
U
>&
p
...
...
examples/dnn_instance_segmentation_train_ex.cpp
View file @
0aa8b4cb
...
...
@@ -29,9 +29,6 @@
#include <dlib/dir_nav.h>
#include <iterator>
#include <thread>
#if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
#include <execution>
#endif // __cplusplus >= 201703L
using
namespace
std
;
using
namespace
dlib
;
...
...
@@ -555,14 +552,13 @@ std::vector<std::vector<truth_instance>> load_all_truth_instances(const std::vec
{
std
::
vector
<
std
::
vector
<
truth_instance
>>
truth_instances
(
listing
.
size
());
std
::
transform
(
#if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
std
::
execution
::
par
,
#endif // __cplusplus >= 201703L
listing
.
begin
(),
listing
.
end
(),
truth_instances
.
begin
(),
load_truth_instances
parallel_for
(
0
,
listing
.
size
(),
[
&
](
size_t
index
)
{
truth_instances
[
index
]
=
load_truth_instances
(
listing
[
index
]);
}
);
return
truth_instances
;
...
...
examples/object_detector_advanced_ex.cpp
View file @
0aa8b4cb
...
...
@@ -179,7 +179,7 @@ public:
inline
friend
void
serialize
(
const
very_simple_feature_extractor
&
item
,
std
::
ostream
&
out
)
{
serialize
(
item
.
feat_image
,
out
);
}
inline
friend
void
deserialize
(
very_simple_feature_extractor
&
item
,
std
::
istream
&
in
)
{
deserialize
(
item
.
feat_image
,
in
);
}
void
copy_configuration
(
const
very_simple_feature_extractor
&
item
){}
void
copy_configuration
(
const
very_simple_feature_extractor
&
){}
private:
array2d
<
unsigned
char
>
feat_image
;
...
...
examples/server_iostream_ex.cpp
View file @
0aa8b4cb
...
...
@@ -34,10 +34,10 @@ class serv : public server_iostream
std
::
istream
&
in
,
std
::
ostream
&
out
,
const
std
::
string
&
foreign_ip
,
const
std
::
string
&
local_ip
,
unsigned
short
foreign_port
,
unsigned
short
local_port
,
uint64
connection_id
const
std
::
string
&
/*
local_ip
*/
,
unsigned
short
/*
foreign_port
*/
,
unsigned
short
/*
local_port
*/
,
uint64
/*
connection_id
*/
)
{
// The details of the connection are contained in the last few arguments to
...
...
Prev
1
2
Next
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