Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
macaon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Franck Dary
macaon
Commits
a21ec725
Commit
a21ec725
authored
4 years ago
by
Franck Dary
Browse files
Options
Downloads
Patches
Plain Diff
Removed checks in get...Iterator
parent
a1fc02b9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
reading_machine/src/Config.cpp
+0
-4
0 additions, 4 deletions
reading_machine/src/Config.cpp
reading_machine/src/SubConfig.cpp
+1
-1
1 addition, 1 deletion
reading_machine/src/SubConfig.cpp
with
1 addition
and
5 deletions
reading_machine/src/Config.cpp
+
0
−
4
View file @
a21ec725
...
...
@@ -319,15 +319,11 @@ const Config::String & Config::getLastNotEmptyHypConst(const std::string & colNa
Config
::
ValueIterator
Config
::
getIterator
(
int
colIndex
,
int
lineIndex
,
int
hypothesisIndex
)
{
if
(
!
has
(
colIndex
,
lineIndex
,
0
))
util
::
myThrow
(
fmt
::
format
(
"asked for line {} but nbLines = {}"
,
lineIndex
,
getNbLines
()));
return
lines
.
begin
()
+
getIndexOfLine
(
lineIndex
-
getFirstLineIndex
())
+
getIndexOfCol
(
colIndex
)
+
hypothesisIndex
;
}
Config
::
ConstValueIterator
Config
::
getConstIterator
(
int
colIndex
,
int
lineIndex
,
int
hypothesisIndex
)
const
{
if
(
!
has
(
colIndex
,
lineIndex
,
0
))
util
::
myThrow
(
fmt
::
format
(
"asked for line {} but nbLines = {}"
,
lineIndex
,
getNbLines
()));
return
lines
.
begin
()
+
getIndexOfLine
(
lineIndex
-
getFirstLineIndex
())
+
getIndexOfCol
(
colIndex
)
+
hypothesisIndex
;
}
...
...
This diff is collapsed.
Click to expand it.
reading_machine/src/SubConfig.cpp
+
1
−
1
View file @
a21ec725
...
...
@@ -37,7 +37,7 @@ bool SubConfig::update()
while
(
firstToSave
!=
lastToSave
)
*
linesBegin
++
=
*
firstToSave
++
;
}
// The new window is a bit shifted to the
w
rit
e
, we will keep the lasts elements from old window
}
// The new window is a bit shifted to the ri
gh
t, we will keep the lasts elements from old window
else
if
(
currentLastLineIndex
>
newFirstLineIndex
and
currentLastLineIndex
<
newLastLineIndex
)
{
auto
linesBegin
=
getIterator
(
0
,
firstLineIndex
,
0
);
...
...
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