Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
corpus2
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Analysers
corpus2
Commits
91f090f5
Commit
91f090f5
authored
13 years ago
by
Paweł Kędzia
Browse files
Options
Downloads
Patches
Plain Diff
Last fix in next_document (I hope!)
parent
75b314aa
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libcorpus2_whole/corpus.h
+5
-6
5 additions, 6 deletions
libcorpus2_whole/corpus.h
with
5 additions
and
6 deletions
libcorpus2_whole/corpus.h
+
5
−
6
View file @
91f090f5
...
...
@@ -50,23 +50,22 @@ public:
/// Next document in corpus
boost
::
shared_ptr
<
Document
>
next_document
()
{
boost
::
shared_ptr
<
Document
>
_empty_doc_ptr
;
static
boost
::
shared_ptr
<
Document
>
_empty_doc_ptr
;
if
(
!
this
->
set_
)
{
if
(
this
->
documents_
.
size
()
==
0
)
{
return
_empty_doc_ptr
;
}
this
->
set_
=
true
;
this
->
current_document_
=
documents_
.
begin
();
}
else
{
if
(
current_document_
==
documents_
.
end
())
{
return
_empty_doc_ptr
;
}
current_document_
++
;
}
if
(
current_document_
==
documents_
.
end
())
{
return
_empty_doc_ptr
;
}
return
*
current_document_
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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