Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
biboumi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
88
Issues
88
List
Boards
Labels
Service Desk
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
louiz’
biboumi
Commits
be9c577d
Commit
be9c577d
authored
Apr 07, 2017
by
louiz’
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply all the clang-tidy performance-* fixes
parent
b82a14f2
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
10 deletions
+10
-10
src/bridge/bridge.cpp
src/bridge/bridge.cpp
+3
-3
src/bridge/bridge.hpp
src/bridge/bridge.hpp
+1
-1
src/irc/irc_client.cpp
src/irc/irc_client.cpp
+2
-2
src/network/credentials_manager.cpp
src/network/credentials_manager.cpp
+1
-1
src/network/credentials_manager.hpp
src/network/credentials_manager.hpp
+1
-1
src/xmpp/xmpp_component.cpp
src/xmpp/xmpp_component.cpp
+1
-1
src/xmpp/xmpp_stanza.cpp
src/xmpp/xmpp_stanza.cpp
+1
-1
No files found.
src/bridge/bridge.cpp
View file @
be9c577d
...
@@ -988,16 +988,16 @@ void Bridge::send_room_history(const std::string& hostname, const std::string& c
...
@@ -988,16 +988,16 @@ void Bridge::send_room_history(const std::string& hostname, const std::string& c
this
->
send_room_history
(
hostname
,
chan_name
,
resource
);
this
->
send_room_history
(
hostname
,
chan_name
,
resource
);
}
}
void
Bridge
::
send_room_history
(
const
std
::
string
&
hostname
,
const
std
::
string
&
chan_name
,
const
std
::
string
&
resource
)
void
Bridge
::
send_room_history
(
const
std
::
string
&
hostname
,
std
::
string
chan_name
,
const
std
::
string
&
resource
)
{
{
#ifdef USE_DATABASE
#ifdef USE_DATABASE
const
auto
coptions
=
Database
::
get_irc_channel_options_with_server_and_global_default
(
this
->
user_jid
,
hostname
,
chan_name
);
const
auto
coptions
=
Database
::
get_irc_channel_options_with_server_and_global_default
(
this
->
user_jid
,
hostname
,
chan_name
);
const
auto
lines
=
Database
::
get_muc_logs
(
this
->
user_jid
,
chan_name
,
hostname
,
coptions
.
maxHistoryLength
.
value
());
const
auto
lines
=
Database
::
get_muc_logs
(
this
->
user_jid
,
chan_name
,
hostname
,
coptions
.
maxHistoryLength
.
value
());
chan_name
.
append
(
utils
::
empty_if_fixed_server
(
"%"
+
hostname
));
for
(
const
auto
&
line
:
lines
)
for
(
const
auto
&
line
:
lines
)
{
{
const
auto
seconds
=
line
.
date
.
value
().
timeStamp
();
const
auto
seconds
=
line
.
date
.
value
().
timeStamp
();
this
->
xmpp
.
send_history_message
(
chan_name
+
utils
::
empty_if_fixed_server
(
"%"
+
hostname
),
line
.
nick
.
value
(),
this
->
xmpp
.
send_history_message
(
chan_name
,
line
.
nick
.
value
(),
line
.
body
.
value
(),
line
.
body
.
value
(),
this
->
user_jid
+
"/"
+
resource
,
seconds
);
this
->
user_jid
+
"/"
+
resource
,
seconds
);
}
}
#endif
#endif
...
...
src/bridge/bridge.hpp
View file @
be9c577d
...
@@ -157,7 +157,7 @@ public:
...
@@ -157,7 +157,7 @@ public:
* Send the MUC history to the user
* Send the MUC history to the user
*/
*/
void
send_room_history
(
const
std
::
string
&
hostname
,
const
std
::
string
&
chan_name
);
void
send_room_history
(
const
std
::
string
&
hostname
,
const
std
::
string
&
chan_name
);
void
send_room_history
(
const
std
::
string
&
hostname
,
const
std
::
string
&
chan_name
,
const
std
::
string
&
resource
);
void
send_room_history
(
const
std
::
string
&
hostname
,
std
::
string
chan_name
,
const
std
::
string
&
resource
);
/**
/**
* Send a MUC message from some participant
* Send a MUC message from some participant
*/
*/
...
...
src/irc/irc_client.cpp
View file @
be9c577d
...
@@ -385,7 +385,7 @@ void IrcClient::send_message(IrcMessage&& message)
...
@@ -385,7 +385,7 @@ void IrcClient::send_message(IrcMessage&& message)
res
+=
message
.
command
;
res
+=
message
.
command
;
for
(
const
std
::
string
&
arg
:
message
.
arguments
)
for
(
const
std
::
string
&
arg
:
message
.
arguments
)
{
{
if
(
arg
.
find
(
" "
)
!=
std
::
string
::
npos
||
if
(
arg
.
find
(
' '
)
!=
std
::
string
::
npos
||
(
!
arg
.
empty
()
&&
arg
[
0
]
==
':'
))
(
!
arg
.
empty
()
&&
arg
[
0
]
==
':'
))
{
{
res
+=
" :"
+
arg
;
res
+=
" :"
+
arg
;
...
@@ -1080,7 +1080,7 @@ void IrcClient::on_channel_mode(const IrcMessage& message)
...
@@ -1080,7 +1080,7 @@ void IrcClient::on_channel_mode(const IrcMessage& message)
{
{
// That mode can also be of type B if it is present in the
// That mode can also be of type B if it is present in the
// prefix_to_mode map
// prefix_to_mode map
for
(
const
std
::
pair
<
char
,
char
>
&
pair
:
this
->
prefix_to_mode
)
for
(
const
auto
&
pair
:
this
->
prefix_to_mode
)
if
(
pair
.
second
==
c
)
if
(
pair
.
second
==
c
)
{
{
type
=
1
;
type
=
1
;
...
...
src/network/credentials_manager.cpp
View file @
be9c577d
...
@@ -44,7 +44,7 @@ const std::string& BasicCredentialsManager::get_trusted_fingerprint() const
...
@@ -44,7 +44,7 @@ const std::string& BasicCredentialsManager::get_trusted_fingerprint() const
void
check_tls_certificate
(
const
std
::
vector
<
Botan
::
X509_Certificate
>&
certs
,
void
check_tls_certificate
(
const
std
::
vector
<
Botan
::
X509_Certificate
>&
certs
,
const
std
::
string
&
hostname
,
const
std
::
string
&
trusted_fingerprint
,
const
std
::
string
&
hostname
,
const
std
::
string
&
trusted_fingerprint
,
std
::
exception_ptr
exc
)
const
std
::
exception_ptr
&
exc
)
{
{
if
(
!
trusted_fingerprint
.
empty
()
&&
!
certs
.
empty
()
&&
if
(
!
trusted_fingerprint
.
empty
()
&&
!
certs
.
empty
()
&&
...
...
src/network/credentials_manager.hpp
View file @
be9c577d
...
@@ -19,7 +19,7 @@ class TCPSocketHandler;
...
@@ -19,7 +19,7 @@ class TCPSocketHandler;
*/
*/
void
check_tls_certificate
(
const
std
::
vector
<
Botan
::
X509_Certificate
>&
certs
,
void
check_tls_certificate
(
const
std
::
vector
<
Botan
::
X509_Certificate
>&
certs
,
const
std
::
string
&
hostname
,
const
std
::
string
&
trusted_fingerprint
,
const
std
::
string
&
hostname
,
const
std
::
string
&
trusted_fingerprint
,
std
::
exception_ptr
exc
);
const
std
::
exception_ptr
&
exc
);
class
BasicCredentialsManager
:
public
Botan
::
Credentials_Manager
class
BasicCredentialsManager
:
public
Botan
::
Credentials_Manager
{
{
...
...
src/xmpp/xmpp_component.cpp
View file @
be9c577d
...
@@ -445,7 +445,7 @@ void XmppComponent::send_muc_leave(const std::string& muc_name, const std::strin
...
@@ -445,7 +445,7 @@ void XmppComponent::send_muc_leave(const std::string& muc_name, const std::strin
presence
[
"to"
]
=
jid_to
;
presence
[
"to"
]
=
jid_to
;
presence
[
"from"
]
=
muc_name
+
"@"
+
this
->
served_hostname
+
"/"
+
nick
;
presence
[
"from"
]
=
muc_name
+
"@"
+
this
->
served_hostname
+
"/"
+
nick
;
presence
[
"type"
]
=
"unavailable"
;
presence
[
"type"
]
=
"unavailable"
;
const
std
::
string
message_str
=
std
::
get
<
0
>
(
message
);
const
std
::
string
&
message_str
=
std
::
get
<
0
>
(
message
);
XmlSubNode
x
(
presence
,
"x"
);
XmlSubNode
x
(
presence
,
"x"
);
x
[
"xmlns"
]
=
MUC_USER_NS
;
x
[
"xmlns"
]
=
MUC_USER_NS
;
if
(
self
)
if
(
self
)
...
...
src/xmpp/xmpp_stanza.cpp
View file @
be9c577d
...
@@ -52,7 +52,7 @@ XmlNode::XmlNode(const std::string& name, XmlNode* parent):
...
@@ -52,7 +52,7 @@ XmlNode::XmlNode(const std::string& name, XmlNode* parent):
parent
(
parent
)
parent
(
parent
)
{
{
// split the namespace and the name
// split the namespace and the name
auto
n
=
name
.
rfind
(
":"
);
auto
n
=
name
.
rfind
(
':'
);
if
(
n
==
std
::
string
::
npos
)
if
(
n
==
std
::
string
::
npos
)
this
->
name
=
name
;
this
->
name
=
name
;
else
else
...
...
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