Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cdo
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor 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
mpim-sw
cdo
Commits
7a4295f7
Commit
7a4295f7
authored
1 year ago
by
Oliver Heidmann
Committed by
Uwe Schulzweida
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
fixed Node::is_done not returning false on variable input operators
parent
f675344f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!137
fixed operator-nodes not being removed properly from the stack
,
!136
fixed operator-nodes not being removed properly from the stack
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/node.cc
+9
-13
9 additions, 13 deletions
src/node.cc
with
9 additions
and
13 deletions
src/node.cc
+
9
−
13
View file @
7a4295f7
...
...
@@ -2,7 +2,6 @@
#include
"cdo_output.h"
#include
"cdo_node_attach_exception.h"
Node
::
Node
(
std
::
vector
<
std
::
string
>::
const_iterator
p_iter
,
const
std
::
string
&
p_oper
,
const
std
::
string
&
args
,
module_constraints
p_constraints
)
:
iter
(
p_iter
),
oper
(
p_oper
),
arguments
(
args
),
constraints
(
p_constraints
),
isFile
(
false
),
isOutFile
(
false
)
...
...
@@ -31,19 +30,19 @@ Node::has_missing_input()
return
true
;
}
//Returns True for files and operators that have the required number of inputs
//Variable input operators always return false
//0 Input operators always return true becaus children.size() == 0
//
Returns True for files and operators that have the required number of inputs
//
Variable input operators always return false
//
0 Input operators always return true becaus children.size() == 0
bool
Node
::
is_done
()
{
bool
done
=
false
;
if
(
isFile
&&
!
isOutFile
)
{
done
=
true
;
}
else
if
((
int
)
children
.
size
()
==
constraints
.
streamInCnt
)
{
done
=
true
;
}
if
(
constraints
.
streamInCnt
==
-
1
)
{
done
=
false
;
}
// varibale inputs always false
else
if
(
isFile
&&
!
isOutFile
)
{
done
=
true
;
}
// files always true
else
if
((
int
)
children
.
size
()
==
constraints
.
streamInCnt
)
{
done
=
true
;
}
Debug
(
CDO_NODE
,
"%s is done: %s"
,
oper
,
done
?
"true"
:
"false"
);
return
done
;
}
...
...
@@ -58,10 +57,7 @@ Node::append(std::shared_ptr<Node> &node)
{
throw
NodeAttachException
(
iter
,
errmsg_node_to_many_inputs
);
}
if
(
node
->
numOut
()
==
0
)
{
throw
NodeAttachException
(
node
,
errmsg_node_no_output
);
}
if
(
node
->
numOut
()
==
0
)
{
throw
NodeAttachException
(
node
,
errmsg_node_no_output
);
}
if
(
get_restriction
()
==
PositionRestrictions
::
FilesOnly
&&
!
node
->
isFile
)
{
size_t
start
=
((
*
iter
)[
0
]
==
'-'
)
?
1
:
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