Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Frida
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
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coenen, Joachim
Frida
Commits
cfaff40a
Commit
cfaff40a
authored
9 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
Repaired bug introduced in
deb37dbc
; now tests pass
parent
50b7835e
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
pub/lib/fsel.cpp
+6
-3
6 additions, 3 deletions
pub/lib/fsel.cpp
pub/lib/loop.cpp
+12
-3
12 additions, 3 deletions
pub/lib/loop.cpp
pub/lib/loop.hpp
+0
-1
0 additions, 1 deletion
pub/lib/loop.hpp
with
18 additions
and
7 deletions
pub/lib/fsel.cpp
+
6
−
3
View file @
cfaff40a
...
...
@@ -9,7 +9,6 @@
#include
"defs.hpp"
#include
<cmath>
#include
<algorithm>
#include
"olf.hpp"
#include
"ptr.hpp"
...
...
@@ -34,7 +33,9 @@ namespace NSel {
const
vector
<
int
>
selD
()
{
vector
<
int
>
ret
;
copy_if
(
FSel
.
begin
(),
FSel
.
end
(),
ret
.
begin
(),
[](
int
k
){
return
P2D
(
NOlm
::
mem_get
(
k
));
}
);
for
(
int
k
:
FSel
)
if
(
P2D
(
NOlm
::
mem_get
(
k
))
)
ret
.
push_back
(
k
);
return
ret
;
}
...
...
@@ -42,7 +43,9 @@ namespace NSel {
const
vector
<
int
>
selC
()
{
vector
<
int
>
ret
;
copy_if
(
FSel
.
begin
(),
FSel
.
end
(),
ret
.
begin
(),
[](
int
k
){
return
P2C
(
NOlm
::
mem_get
(
k
));
}
);
for
(
int
k
:
FSel
)
if
(
P2C
(
NOlm
::
mem_get
(
k
))
)
ret
.
push_back
(
k
);
return
ret
;
}
...
...
This diff is collapsed.
Click to expand it.
pub/lib/loop.cpp
+
12
−
3
View file @
cfaff40a
...
...
@@ -28,7 +28,9 @@ FileIterator::FileIterator( const vector<int>& _Sel, bool tolerate_empty )
}
POlo
FileIterator
::
get
()
{
if
(
!
going
()
)
{
cout
<<
"DEBUG 1
\n
"
;
if
(
iV
>=
Sel
.
size
()
)
return
POlo
();
int
k
=
Sel
[
iV
];
if
(
k
<
0
)
...
...
@@ -36,19 +38,26 @@ POlo FileIterator::get()
if
(
k
>=
NOlm
::
mem_size
()
)
throw
"FileSelection["
+
S
(
iV
)
+
"]="
+
S
(
k
)
+
" exceeds online memory size "
+
S
(
NOlm
::
mem_size
());
++
iV
;
cout
<<
"DEBUG 2
\n
"
;
return
NOlm
::
mem_get
(
k
);
}
POld
FileIterator
::
getD
()
{
if
(
POld
ret
=
P2D
(
get
())
)
POlo
f
=
get
();
if
(
!
f
)
return
POld
();
if
(
POld
ret
=
P2D
(
f
)
)
return
ret
;
throw
S
(
"BUG: non-D file found by D iterator"
);
}
POlc
FileIterator
::
getC
()
{
if
(
POlc
ret
=
P2C
(
get
())
)
POlo
f
=
get
();
if
(
!
f
)
return
POlc
();
if
(
POlc
ret
=
P2C
(
f
)
)
return
ret
;
throw
S
(
"BUG: non-C file found by C iterator"
);
}
This diff is collapsed.
Click to expand it.
pub/lib/loop.hpp
+
0
−
1
View file @
cfaff40a
...
...
@@ -14,7 +14,6 @@ class FileIterator {
private:
int
iV
;
vector
<
int
>
Sel
;
bool
going
()
const
{
return
iV
<
Sel
.
size
();
}
public:
FileIterator
(
const
vector
<
int
>&
_Sel
,
bool
tolerate_empty
=
false
);
void
reset
()
{
iV
=
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