Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AndroidSystemCore
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Werner Sembach
AndroidSystemCore
Commits
2ead1719
Commit
2ead1719
authored
Dec 20, 2016
by
Treehugger Robot
Committed by
Gerrit Code Review
Dec 20, 2016
Browse files
Options
Downloads
Plain Diff
Merge "logd: trailing spaces in log statistics (part deux)"
parents
1fa079b2
b545e1c9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
logd/LogStatistics.h
+12
-9
12 additions, 9 deletions
logd/LogStatistics.h
with
12 additions
and
9 deletions
logd/LogStatistics.h
+
12
−
9
View file @
2ead1719
...
@@ -17,11 +17,12 @@
...
@@ -17,11 +17,12 @@
#ifndef _LOGD_LOG_STATISTICS_H__
#ifndef _LOGD_LOG_STATISTICS_H__
#define _LOGD_LOG_STATISTICS_H__
#define _LOGD_LOG_STATISTICS_H__
#include
<
memory
>
#include
<
ctype.h
>
#include
<stdlib.h>
#include
<stdlib.h>
#include
<sys/types.h>
#include
<sys/types.h>
#include
<algorithm>
// std::max
#include
<algorithm>
// std::max
#include
<memory>
#include
<string>
// std::string
#include
<string>
// std::string
#include
<unordered_map>
#include
<unordered_map>
...
@@ -211,14 +212,16 @@ struct EntryBase {
...
@@ -211,14 +212,16 @@ struct EntryBase {
EntryBaseConstants
::
total_len
EntryBaseConstants
::
total_len
-
name
.
length
()
-
drop_len
-
1
);
-
name
.
length
()
-
drop_len
-
1
);
if
(
pruned
.
length
())
{
std
::
string
ret
=
android
::
base
::
StringPrintf
(
"%s%*s%*s"
,
return
android
::
base
::
StringPrintf
(
"%s%*s%*s
\n
"
,
name
.
c_str
(),
name
.
c_str
(),
(
int
)
size_len
,
size
.
c_str
(),
(
int
)
size_len
,
size
.
c_str
(),
(
int
)
drop_len
,
pruned
.
c_str
());
(
int
)
drop_len
,
pruned
.
c_str
());
}
else
{
// remove any trailing spaces
return
android
::
base
::
StringPrintf
(
"%s%*s
\n
"
,
name
.
c_str
(),
size_t
pos
=
ret
.
size
();
(
int
)
size_len
,
size
.
c_str
());
size_t
len
=
0
;
}
while
(
pos
&&
isspace
(
ret
[
--
pos
]))
++
len
;
if
(
len
)
ret
.
erase
(
pos
+
1
,
len
);
return
ret
+
"
\n
"
;
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment