Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Rodrigo Oliveira
libcloudstorage
Commits
ff4e9f08
Commit
ff4e9f08
authored
Jan 16, 2021
by
Alexandre Janniaux
Browse files
CloudProvider: remove redundant std::move on return
parent
f7b5d81c
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/CloudProvider/Box.cpp
View file @
ff4e9f08
...
...
@@ -221,7 +221,7 @@ IItem::Pointer Box::toItem(const Json::Value& v) const {
FileId
(
type
==
IItem
::
FileType
::
Directory
,
v
[
"id"
].
asString
()),
v
[
"size"
].
asUInt64
(),
util
::
parse_time
(
v
[
"modified_at"
].
asString
()),
type
);
return
std
::
move
(
item
)
;
return
item
;
}
void
Box
::
Auth
::
initialize
(
IHttp
*
http
,
IHttpServerFactory
*
factory
)
{
...
...
src/CloudProvider/GoogleDrive.cpp
View file @
ff4e9f08
...
...
@@ -393,7 +393,7 @@ IItem::Pointer GoogleDrive::toItem(const Json::Value& v) const {
std
::
vector
<
std
::
string
>
parents
;
for
(
auto
id
:
v
[
"parents"
])
parents
.
push_back
(
id
.
asString
());
item
->
set_parents
(
parents
);
return
std
::
move
(
item
)
;
return
item
;
}
void
GoogleDrive
::
Auth
::
initialize
(
IHttp
*
http
,
IHttpServerFactory
*
factory
)
{
...
...
src/CloudProvider/MegaNz.cpp
View file @
ff4e9f08
...
...
@@ -905,7 +905,7 @@ IItem::Pointer MegaNz::toItem(MegaNode* node) {
"&name="
+
util
::
Url
::
escape
(
util
::
to_base64
(
node
->
getName
()))
+
"&size="
+
std
::
to_string
(
node
->
getSize
())
+
"&state="
+
util
::
Url
::
escape
(
auth
()
->
state
()));
return
std
::
move
(
item
)
;
return
item
;
}
std
::
string
MegaNz
::
randomString
(
int
length
)
{
...
...
src/CloudProvider/OneDrive.cpp
View file @
ff4e9f08
...
...
@@ -236,7 +236,7 @@ IItem::Pointer OneDrive::toItem(const Json::Value& v) const {
util
::
parse_time
(
v
[
"lastModifiedDateTime"
].
asString
()),
type
);
item
->
set_url
(
v
[
"@microsoft.graph.downloadUrl"
].
asString
());
item
->
set_thumbnail_url
(
v
[
"thumbnails"
][
0
][
"small"
][
"url"
].
asString
());
return
std
::
move
(
item
)
;
return
item
;
}
IItem
::
List
OneDrive
::
listDirectoryResponse
(
...
...
src/CloudProvider/PCloud.cpp
View file @
ff4e9f08
...
...
@@ -223,7 +223,7 @@ IItem::Pointer PCloud::toItem(const Json::Value& v) const {
if
(
v
[
"thumb"
].
asBool
())
item
->
set_thumbnail_url
(
endpoint
()
+
"/getthumb?fileid="
+
item
->
id
()
+
"&size="
+
THUMBNAIL_SIZE
);
return
std
::
move
(
item
)
;
return
item
;
}
void
PCloud
::
Auth
::
initialize
(
IHttp
*
http
,
IHttpServerFactory
*
factory
)
{
...
...
src/CloudProvider/WebDav.cpp
View file @
ff4e9f08
...
...
@@ -221,7 +221,7 @@ IItem::Pointer WebDav::renameItemResponse(const IItem& item,
auto
url
=
util
::
Url
(
webdav_url_
);
i
->
set_url
(
url
.
protocol
()
+
"://"
+
user_
+
":"
+
password_
+
"@"
+
url
.
host
()
+
url
.
path
()
+
i
->
id
()
+
url
.
query
());
return
std
::
move
(
i
)
;
return
i
;
}
IItem
::
Pointer
WebDav
::
moveItemResponse
(
const
IItem
&
source
,
const
IItem
&
dest
,
...
...
@@ -233,7 +233,7 @@ IItem::Pointer WebDav::moveItemResponse(const IItem& source, const IItem& dest,
auto
url
=
util
::
Url
(
webdav_url_
);
i
->
set_url
(
url
.
protocol
()
+
"://"
+
user_
+
":"
+
password_
+
"@"
+
url
.
host
()
+
url
.
path
()
+
i
->
id
()
+
url
.
query
());
return
std
::
move
(
i
)
;
return
i
;
}
IItem
::
List
WebDav
::
listDirectoryResponse
(
const
IItem
&
,
std
::
istream
&
stream
,
...
...
@@ -281,7 +281,7 @@ IItem::Pointer WebDav::toItem(const tinyxml2::XMLNode* node) const {
timestamp
,
type
);
item
->
set_url
(
url
.
protocol
()
+
"://"
+
user_
+
":"
+
password_
+
"@"
+
url
.
host
()
+
url
.
path
()
+
id
+
url
.
query
());
return
std
::
move
(
item
)
;
return
item
;
}
bool
WebDav
::
reauthorize
(
int
code
,
...
...
src/CloudProvider/YandexDisk.cpp
View file @
ff4e9f08
...
...
@@ -378,7 +378,7 @@ IItem::Pointer YandexDisk::toItem(const Json::Value& v) const {
v
.
isMember
(
"size"
)
?
v
[
"size"
].
asUInt64
()
:
IItem
::
UnknownSize
,
util
::
parse_time
(
v
[
"modified"
].
asString
()),
type
);
item
->
set_thumbnail_url
(
v
[
"preview"
].
asString
());
return
std
::
move
(
item
)
;
return
item
;
}
void
YandexDisk
::
authorizeRequest
(
IHttpRequest
&
request
)
const
{
...
...
src/CloudProvider/YouTube.cpp
View file @
ff4e9f08
...
...
@@ -492,7 +492,7 @@ Item::Pointer YouTube::toItem(const Json::Value& v, std::string kind,
IItem
::
FileType
::
Directory
);
item
->
set_thumbnail_url
(
v
[
"snippet"
][
"thumbnails"
][
"default"
][
"url"
].
asString
());
return
std
::
move
(
item
)
;
return
item
;
}
else
{
std
::
string
video_id
;
if
(
kind
==
"youtube#playlistItemListResponse"
)
...
...
@@ -509,7 +509,7 @@ Item::Pointer YouTube::toItem(const Json::Value& v, std::string kind,
audio
?
IItem
::
FileType
::
Audio
:
IItem
::
FileType
::
Video
);
item
->
set_thumbnail_url
(
v
[
"snippet"
][
"thumbnails"
][
"default"
][
"url"
].
asString
());
return
std
::
move
(
item
)
;
return
item
;
}
}
...
...
Write
Preview
Supports
Markdown
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