Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
R3
legacy
bedtools2
Commits
601760a4
Commit
601760a4
authored
May 14, 2012
by
Aaron
Browse files
safely handle empty input
parent
8c626811
Changes
1
Show whitespace changes
Inline
Side-by-side
src/groupBy/groupBy.cpp
View file @
601760a4
...
...
@@ -380,6 +380,9 @@ void ReportSummary(const vector<string> &group, const vector<vector<string> > &d
vector
<
string
>
result
;
for
(
size_t
i
=
0
;
i
<
data
.
size
();
i
++
)
{
if
(
data
[
i
].
size
()
==
0
)
continue
;
string
op
=
ops
[
i
];
std
::
stringstream
buffer
;
VectorOps
vo
(
data
[
i
]);
...
...
@@ -442,10 +445,12 @@ void ReportSummary(const vector<string> &group, const vector<vector<string> > &d
result
.
push_back
(
buffer
.
str
());
}
}
if
(
result
.
size
()
>
0
)
{
for_each
(
group
.
begin
(),
group
.
end
(),
TabPrintPost
);
cout
<<
*
result
.
begin
();
for_each
(
++
result
.
begin
(),
result
.
end
(),
TabPrintPre
);
cout
<<
endl
;
//Gets rid of extraneous tab
}
}
...
...
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