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
9cd103e5
Commit
9cd103e5
authored
Apr 09, 2016
by
Davis King
Browse files
Minor changes to avoid warnings and a bug in clang.
parent
b509a169
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
dlib/smart_pointers/shared_ptr.h
dlib/smart_pointers/shared_ptr.h
+4
-2
dlib/test/matrix3.cpp
dlib/test/matrix3.cpp
+2
-1
dlib/test/smart_pointers.cpp
dlib/test/smart_pointers.cpp
+2
-1
No files found.
dlib/smart_pointers/shared_ptr.h
View file @
9cd103e5
...
@@ -12,7 +12,8 @@
...
@@ -12,7 +12,8 @@
// Don't warn about the use of std::auto_ptr in this file. There is a pragma at the end of
// Don't warn about the use of std::auto_ptr in this file. There is a pragma at the end of
// this file that re-enables the warning.
// this file that re-enables the warning.
#if defined(__GNUC__) && ((__GNUC__ >= 4 && __GNUC_MINOR__ >= 6) || (__GNUC__ > 4))
#if (defined(__GNUC__) && ((__GNUC__ >= 4 && __GNUC_MINOR__ >= 6) || (__GNUC__ > 4))) || \
(defined(__clang__) && ((__clang_major__ >= 3 && __clang_minor__ >= 4)))
#pragma GCC diagnostic push
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
#endif
...
@@ -527,7 +528,8 @@ namespace dlib
...
@@ -527,7 +528,8 @@ namespace dlib
}
}
#if defined(__GNUC__) && ((__GNUC__ >= 4 && __GNUC_MINOR__ >= 6) || (__GNUC__ > 4))
#if (defined(__GNUC__) && ((__GNUC__ >= 4 && __GNUC_MINOR__ >= 6) || (__GNUC__ > 4))) || \
(defined(__clang__) && ((__clang_major__ >= 3 && __clang_minor__ >= 4)))
#pragma GCC diagnostic pop
#pragma GCC diagnostic pop
#endif
#endif
...
...
dlib/test/matrix3.cpp
View file @
9cd103e5
...
@@ -596,7 +596,8 @@ namespace
...
@@ -596,7 +596,8 @@ namespace
c_check_equal
(
tmp
(
c_temp
+
conj
(
c_rv4
)
*
c_cv4
),
c_temp
+
conj
(
c_rv4
)
*
c_cv4
);
c_check_equal
(
tmp
(
c_temp
+
conj
(
c_rv4
)
*
c_cv4
),
c_temp
+
conj
(
c_rv4
)
*
c_cv4
);
c_check_equal
(
tmp
(
c_temp
+
trans
(
conj
(
c_cv4
))
*
trans
(
c_rv4
)),
c_temp
+
trans
(
conj
(
c_cv4
))
*
trans
(
c_rv4
));
c_check_equal
(
tmp
(
c_temp
+
trans
(
conj
(
c_cv4
))
*
trans
(
c_rv4
)),
c_temp
+
trans
(
conj
(
c_cv4
))
*
trans
(
c_rv4
));
DLIB_TEST
(
abs
((
static_cast
<
complex
<
type
>
>
(
c_rv4
*
c_cv4
)
+
i
)
-
((
c_rv4
*
c_cv4
)(
0
)
+
i
))
<
std
::
sqrt
(
std
::
numeric_limits
<
type
>::
epsilon
())
*
eps_mul
);
complex
<
type
>
tmp
=
c_rv4
*
c_cv4
;
DLIB_TEST
(
abs
((
tmp
+
i
)
-
((
c_rv4
*
c_cv4
)(
0
)
+
i
))
<
std
::
sqrt
(
std
::
numeric_limits
<
type
>::
epsilon
())
*
eps_mul
);
DLIB_TEST
(
max
(
abs
((
rv4
*
cv4
+
1.0
)
-
((
rv4
*
cv4
)(
0
)
+
1.0
)))
<
std
::
sqrt
(
std
::
numeric_limits
<
type
>::
epsilon
())
*
eps_mul
);
DLIB_TEST
(
max
(
abs
((
rv4
*
cv4
+
1.0
)
-
((
rv4
*
cv4
)(
0
)
+
1.0
)))
<
std
::
sqrt
(
std
::
numeric_limits
<
type
>::
epsilon
())
*
eps_mul
);
}
}
...
...
dlib/test/smart_pointers.cpp
View file @
9cd103e5
...
@@ -11,7 +11,8 @@
...
@@ -11,7 +11,8 @@
#include "tester.h"
#include "tester.h"
// Don't warn about auto_ptr
// Don't warn about auto_ptr
#if defined(__GNUC__) && ((__GNUC__ >= 4 && __GNUC_MINOR__ >= 6) || (__GNUC__ > 4))
#if (defined(__GNUC__) && ((__GNUC__ >= 4 && __GNUC_MINOR__ >= 6) || (__GNUC__ > 4))) || \
(defined(__clang__) && ((__clang_major__ >= 3 && __clang_minor__ >= 4)))
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
#endif
...
...
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