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
520b7c30
Commit
520b7c30
authored
Nov 29, 2013
by
Davis King
Browse files
Made dlib::file implicitly convertible to std::string.
parent
454c2ea1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
0 deletions
+14
-0
dlib/dir_nav/dir_nav_kernel_1.h
dlib/dir_nav/dir_nav_kernel_1.h
+3
-0
dlib/dir_nav/dir_nav_kernel_2.h
dlib/dir_nav/dir_nav_kernel_2.h
+3
-0
dlib/dir_nav/dir_nav_kernel_abstract.h
dlib/dir_nav/dir_nav_kernel_abstract.h
+8
-0
No files found.
dlib/dir_nav/dir_nav_kernel_1.h
View file @
520b7c30
...
...
@@ -101,6 +101,9 @@ namespace dlib
inline
const
std
::
string
&
full_name
(
)
const
{
return
state
.
full_name
;
}
operator
std
::
string
(
)
const
{
return
full_name
();
}
inline
uint64
size
(
)
const
{
return
state
.
file_size
;
}
...
...
dlib/dir_nav/dir_nav_kernel_2.h
View file @
520b7c30
...
...
@@ -109,6 +109,9 @@ namespace dlib
inline
uint64
size
(
)
const
{
return
state
.
file_size
;
}
operator
std
::
string
(
)
const
{
return
full_name
();
}
bool
operator
==
(
const
file
&
rhs
)
const
;
...
...
dlib/dir_nav/dir_nav_kernel_abstract.h
View file @
520b7c30
...
...
@@ -139,6 +139,14 @@ namespace dlib
- returns the size of this file in bytes.
!*/
operator
std
::
string
(
)
const
;
/*!
ensures
- returns full_name()
(i.e. provides an implicit conversion to string from dlib::file)
!*/
file
&
operator
=
(
const
file
&
rhs
);
...
...
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