Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
eeeef3ea
Commit
eeeef3ea
authored
Dec 03, 2013
by
Denis Krjuchkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fs/AllocatedPath: use PathTraits::BuildFS
parent
96413b16
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
AllocatedPath.cxx
src/fs/AllocatedPath.cxx
+0
-6
AllocatedPath.hxx
src/fs/AllocatedPath.hxx
+14
-4
No files found.
src/fs/AllocatedPath.cxx
View file @
eeeef3ea
...
@@ -37,12 +37,6 @@ inline AllocatedPath::AllocatedPath(Donate, pointer _value)
...
@@ -37,12 +37,6 @@ inline AllocatedPath::AllocatedPath(Donate, pointer _value)
AllocatedPath
::~
AllocatedPath
()
{}
AllocatedPath
::~
AllocatedPath
()
{}
AllocatedPath
AllocatedPath
AllocatedPath
::
Build
(
const_pointer
a
,
const_pointer
b
)
{
return
AllocatedPath
(
Donate
(),
g_build_filename
(
a
,
b
,
nullptr
));
}
AllocatedPath
AllocatedPath
::
FromUTF8
(
const
char
*
path_utf8
)
AllocatedPath
::
FromUTF8
(
const
char
*
path_utf8
)
{
{
return
AllocatedPath
(
Donate
(),
::
PathFromUTF8
(
path_utf8
));
return
AllocatedPath
(
Donate
(),
::
PathFromUTF8
(
path_utf8
));
...
...
src/fs/AllocatedPath.hxx
View file @
eeeef3ea
...
@@ -55,6 +55,10 @@ class AllocatedPath {
...
@@ -55,6 +55,10 @@ class AllocatedPath {
AllocatedPath
(
string
&&
_value
)
:
value
(
_value
)
{}
AllocatedPath
(
string
&&
_value
)
:
value
(
_value
)
{}
static
AllocatedPath
Build
(
const_pointer
a
,
size_t
a_size
,
const_pointer
b
,
size_t
b_size
)
{
return
AllocatedPath
(
PathTraits
::
BuildFS
(
a
,
a_size
,
b
,
b_size
));
}
public
:
public
:
/**
/**
* Copy a #AllocatedPath object.
* Copy a #AllocatedPath object.
...
@@ -88,22 +92,28 @@ public:
...
@@ -88,22 +92,28 @@ public:
* Join two path components with the path separator.
* Join two path components with the path separator.
*/
*/
gcc_pure
gcc_nonnull_all
gcc_pure
gcc_nonnull_all
static
AllocatedPath
Build
(
const_pointer
a
,
const_pointer
b
);
static
AllocatedPath
Build
(
const_pointer
a
,
const_pointer
b
)
{
return
Build
(
a
,
PathTraits
::
GetLengthFS
(
a
),
b
,
PathTraits
::
GetLengthFS
(
b
));
}
gcc_pure
gcc_nonnull_all
gcc_pure
gcc_nonnull_all
static
AllocatedPath
Build
(
const_pointer
a
,
const
AllocatedPath
&
b
)
{
static
AllocatedPath
Build
(
const_pointer
a
,
const
AllocatedPath
&
b
)
{
return
Build
(
a
,
b
.
c_str
());
return
Build
(
a
,
PathTraits
::
GetLengthFS
(
a
),
b
.
value
.
c_str
(),
b
.
value
.
size
());
}
}
gcc_pure
gcc_nonnull_all
gcc_pure
gcc_nonnull_all
static
AllocatedPath
Build
(
const
AllocatedPath
&
a
,
const_pointer
b
)
{
static
AllocatedPath
Build
(
const
AllocatedPath
&
a
,
const_pointer
b
)
{
return
Build
(
a
.
c_str
(),
b
);
return
Build
(
a
.
value
.
c_str
(),
a
.
value
.
size
(),
b
,
PathTraits
::
GetLengthFS
(
b
));
}
}
gcc_pure
gcc_pure
static
AllocatedPath
Build
(
const
AllocatedPath
&
a
,
static
AllocatedPath
Build
(
const
AllocatedPath
&
a
,
const
AllocatedPath
&
b
)
{
const
AllocatedPath
&
b
)
{
return
Build
(
a
.
c_str
(),
b
.
c_str
());
return
Build
(
a
.
value
.
c_str
(),
a
.
value
.
size
(),
b
.
value
.
c_str
(),
b
.
value
.
size
());
}
}
/**
/**
...
...
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