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
251196c3
"Python/convert.py" did not exist on "22aaadc3fbd2bd784eacd9837726806746044cbb"
Commit
251196c3
authored
Nov 28, 2013
by
Davis King
Browse files
Minor changes to avoid compiler errors in visual studio 2013
parent
1b0ecb94
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
74 additions
and
128 deletions
+74
-128
dlib/binary_search_tree/binary_search_tree_kernel_c.h
dlib/binary_search_tree/binary_search_tree_kernel_c.h
+24
-42
dlib/hash_table/hash_table_kernel_c.h
dlib/hash_table/hash_table_kernel_c.h
+20
-38
dlib/map/map_kernel_c.h
dlib/map/map_kernel_c.h
+25
-43
dlib/test/geometry.cpp
dlib/test/geometry.cpp
+1
-1
dlib/test/matrix3.cpp
dlib/test/matrix3.cpp
+4
-4
No files found.
dlib/binary_search_tree/binary_search_tree_kernel_c.h
View file @
251196c3
...
@@ -43,12 +43,30 @@ namespace dlib
...
@@ -43,12 +43,30 @@ namespace dlib
range
&
r
range
&
r
);
);
const
map_pair
<
domain
,
range
>&
element
(
const
map_pair
<
domain
,
range
>&
element
(
)
const
;
)
const
{
DLIB_CASSERT
(
this
->
current_element_valid
()
==
true
,
"
\t
const map_pair<domain,range>& binary_search_tree::element() const"
<<
"
\n\t
you can't access the current element if it doesn't exist"
<<
"
\n\t
this: "
<<
this
);
map_pair
<
domain
,
range
>&
element
(
return
bst_base
::
element
();
}
map_pair
<
domain
,
range
>&
element
(
)
{
DLIB_CASSERT
(
this
->
current_element_valid
()
==
true
,
"
\t
map_pair<domain,range>& binary_search_tree::element()"
<<
"
\n\t
you can't access the current element if it doesn't exist"
<<
"
\n\t
this: "
<<
this
);
);
return
bst_base
::
element
();
}
void
remove_last_in_order
(
void
remove_last_in_order
(
domain
&
d
,
domain
&
d
,
range
&
r
range
&
r
...
@@ -168,42 +186,6 @@ namespace dlib
...
@@ -168,42 +186,6 @@ namespace dlib
bst_base
::
remove_any
(
d
,
r
);
bst_base
::
remove_any
(
d
,
r
);
}
}
// ----------------------------------------------------------------------------------------
template
<
typename
bst_base
>
const
map_pair
<
typename
bst_base
::
domain_type
,
typename
bst_base
::
range_type
>&
binary_search_tree_kernel_c
<
bst_base
>::
element
(
)
const
{
DLIB_CASSERT
(
this
->
current_element_valid
()
==
true
,
"
\t
const map_pair<domain,range>& binary_search_tree::element() const"
<<
"
\n\t
you can't access the current element if it doesn't exist"
<<
"
\n\t
this: "
<<
this
);
return
bst_base
::
element
();
}
// ----------------------------------------------------------------------------------------
template
<
typename
bst_base
>
map_pair
<
typename
bst_base
::
domain_type
,
typename
bst_base
::
range_type
>&
binary_search_tree_kernel_c
<
bst_base
>::
element
(
)
{
DLIB_CASSERT
(
this
->
current_element_valid
()
==
true
,
"
\t
map_pair<domain,range>& binary_search_tree::element()"
<<
"
\n\t
you can't access the current element if it doesn't exist"
<<
"
\n\t
this: "
<<
this
);
return
bst_base
::
element
();
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template
<
template
<
...
...
dlib/hash_table/hash_table_kernel_c.h
View file @
251196c3
...
@@ -54,11 +54,29 @@ namespace dlib
...
@@ -54,11 +54,29 @@ namespace dlib
);
);
const
map_pair
<
domain
,
range
>&
element
(
const
map_pair
<
domain
,
range
>&
element
(
)
const
;
)
const
{
DLIB_CASSERT
(
this
->
current_element_valid
()
==
true
,
"
\t
const map_pair<domain,range>& hash_table::element() const"
<<
"
\n\t
you can't access the current element if it doesn't exist"
<<
"
\n\t
this: "
<<
this
);
return
ht_base
::
element
();
}
map_pair
<
domain
,
range
>&
element
(
map_pair
<
domain
,
range
>&
element
(
)
{
DLIB_CASSERT
(
this
->
current_element_valid
()
==
true
,
"
\t
map_pair<domain,range>& hash_table::element()"
<<
"
\n\t
you can't access the current element if it doesn't exist"
<<
"
\n\t
this: "
<<
this
);
);
return
ht_base
::
element
();
}
};
};
...
@@ -168,42 +186,6 @@ namespace dlib
...
@@ -168,42 +186,6 @@ namespace dlib
ht_base
::
remove_any
(
d
,
r
);
ht_base
::
remove_any
(
d
,
r
);
}
}
// ----------------------------------------------------------------------------------------
template
<
typename
ht_base
>
const
map_pair
<
typename
ht_base
::
domain_type
,
typename
ht_base
::
range_type
>&
hash_table_kernel_c
<
ht_base
>::
element
(
)
const
{
DLIB_CASSERT
(
this
->
current_element_valid
()
==
true
,
"
\t
const map_pair<domain,range>& hash_table::element() const"
<<
"
\n\t
you can't access the current element if it doesn't exist"
<<
"
\n\t
this: "
<<
this
);
return
ht_base
::
element
();
}
// ----------------------------------------------------------------------------------------
template
<
typename
ht_base
>
map_pair
<
typename
ht_base
::
domain_type
,
typename
ht_base
::
range_type
>&
hash_table_kernel_c
<
ht_base
>::
element
(
)
{
DLIB_CASSERT
(
this
->
current_element_valid
()
==
true
,
"
\t
map_pair<domain,range>& hash_table::element()"
<<
"
\n\t
you can't access the current element if it doesn't exist"
<<
"
\n\t
this: "
<<
this
);
return
ht_base
::
element
();
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
}
}
...
...
dlib/map/map_kernel_c.h
View file @
251196c3
...
@@ -50,11 +50,33 @@ namespace dlib
...
@@ -50,11 +50,33 @@ namespace dlib
)
const
;
)
const
;
const
map_pair
<
domain
,
range
>&
element
(
const
map_pair
<
domain
,
range
>&
element
(
)
const
;
)
const
{
// make sure requires clause is not broken
DLIB_CASSERT
(
this
->
current_element_valid
()
==
true
,
"
\t
const map_pair<domain,range>& map::element"
<<
"
\n\t
you can't access the current element if it doesn't exist"
<<
"
\n\t
this: "
<<
this
);
// call the real function
return
map_base
::
element
();
}
map_pair
<
domain
,
range
>&
element
(
map_pair
<
domain
,
range
>&
element
(
)
{
// make sure requires clause is not broken
DLIB_CASSERT
(
this
->
current_element_valid
()
==
true
,
"
\t
map_pair<domain,range>& map::element"
<<
"
\n\t
you can't access the current element if it doesn't exist"
<<
"
\n\t
this: "
<<
this
);
);
// call the real function
return
map_base
::
element
();
}
};
};
template
<
template
<
...
@@ -218,46 +240,6 @@ namespace dlib
...
@@ -218,46 +240,6 @@ namespace dlib
return
map_base
::
operator
[](
d
);
return
map_base
::
operator
[](
d
);
}
}
// ----------------------------------------------------------------------------------------
template
<
typename
map_base
>
const
map_pair
<
typename
map_base
::
domain_type
,
typename
map_base
::
range_type
>&
map_kernel_c
<
map_base
>::
element
(
)
const
{
// make sure requires clause is not broken
DLIB_CASSERT
(
this
->
current_element_valid
()
==
true
,
"
\t
const map_pair<domain,range>& map::element"
<<
"
\n\t
you can't access the current element if it doesn't exist"
<<
"
\n\t
this: "
<<
this
);
// call the real function
return
map_base
::
element
();
}
// ----------------------------------------------------------------------------------------
template
<
typename
map_base
>
map_pair
<
typename
map_base
::
domain_type
,
typename
map_base
::
range_type
>&
map_kernel_c
<
map_base
>::
element
(
)
{
// make sure requires clause is not broken
DLIB_CASSERT
(
this
->
current_element_valid
()
==
true
,
"
\t
map_pair<domain,range>& map::element"
<<
"
\n\t
you can't access the current element if it doesn't exist"
<<
"
\n\t
this: "
<<
this
);
// call the real function
return
map_base
::
element
();
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
}
}
...
...
dlib/test/geometry.cpp
View file @
251196c3
...
@@ -107,7 +107,7 @@ namespace
...
@@ -107,7 +107,7 @@ namespace
DLIB_TEST
(
rect2
==
rect1
);
DLIB_TEST
(
rect2
==
rect1
);
DLIB_TEST
(
p2
==
p1
);
DLIB_TEST
(
p2
==
p1
);
DLIB_TEST
(
v2
==
v1
);
DLIB_TEST
(
v2
==
v1
);
DLIB_TEST
(
sin
);
DLIB_TEST
(
sin
.
good
()
);
DLIB_TEST
(
sin
.
get
()
==
EOF
);
DLIB_TEST
(
sin
.
get
()
==
EOF
);
...
...
dlib/test/matrix3.cpp
View file @
251196c3
...
@@ -1058,16 +1058,16 @@ namespace
...
@@ -1058,16 +1058,16 @@ namespace
{
{
istringstream
sin
(
" 1 2
\n
3"
);
istringstream
sin
(
" 1 2
\n
3"
);
matrix
<
double
>
m
;
matrix
<
double
>
m
;
DLIB_TEST
(
sin
);
DLIB_TEST
(
sin
.
good
()
);
sin
>>
m
;
sin
>>
m
;
DLIB_TEST
(
!
sin
);
DLIB_TEST
(
!
sin
.
good
()
);
}
}
{
{
istringstream
sin
(
""
);
istringstream
sin
(
""
);
matrix
<
double
>
m
;
matrix
<
double
>
m
;
DLIB_TEST
(
sin
);
DLIB_TEST
(
sin
.
good
()
);
sin
>>
m
;
sin
>>
m
;
DLIB_TEST
(
!
sin
);
DLIB_TEST
(
!
sin
.
good
()
);
}
}
}
}
...
...
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