Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
ScalFMM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
solverstack
ScalFMM
Commits
1902e750
Commit
1902e750
authored
6 years ago
by
ESTERIE Pierre
Browse files
Options
Downloads
Patches
Plain Diff
Qualifying size calls
parent
dbdb0964
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Contribs/inria/tcli/tcli.hpp
+6
-6
6 additions, 6 deletions
Contribs/inria/tcli/tcli.hpp
with
6 additions
and
6 deletions
Contribs/inria/tcli/tcli.hpp
+
6
−
6
View file @
1902e750
...
@@ -169,8 +169,8 @@ bool parse_parameter(Handle<ParamDesc>& handle,
...
@@ -169,8 +169,8 @@ bool parse_parameter(Handle<ParamDesc>& handle,
(
void
)
args
,
(
void
)
handle
,
(
void
)
current_arg
;
(
void
)
args
,
(
void
)
handle
,
(
void
)
current_arg
;
data
=
true
;
data
=
true
;
std
::
string
flag
=
*
(
current_arg
-
1
);
std
::
string
flag
=
*
(
current_arg
-
1
);
if
(
size
(
flag
)
>
4
)
{
if
(
detail
::
size
(
flag
)
>
4
)
{
if
(
flag
.
find
(
std
::
string
(
"=off"
))
==
size
(
flag
)
-
4
)
{
if
(
flag
.
find
(
std
::
string
(
"=off"
))
==
detail
::
size
(
flag
)
-
4
)
{
data
=
false
;
data
=
false
;
}
}
}
}
...
@@ -498,23 +498,23 @@ struct parameter_descripor_validator {
...
@@ -498,23 +498,23 @@ struct parameter_descripor_validator {
using
std
::
begin
;
using
std
::
begin
;
using
std
::
end
;
using
std
::
end
;
if
(
size
(
handle
.
descriptor
.
flags
)
==
0
if
(
detail
::
size
(
handle
.
descriptor
.
flags
)
==
0
||
(
std
::
find
(
begin
(
handle
.
descriptor
.
flags
),
end
(
handle
.
descriptor
.
flags
),
""
)
||
(
std
::
find
(
begin
(
handle
.
descriptor
.
flags
),
end
(
handle
.
descriptor
.
flags
),
""
)
!=
end
(
handle
.
descriptor
.
flags
)))
!=
end
(
handle
.
descriptor
.
flags
)))
{
{
this
->
missing_flags
.
emplace_back
(
typeid
(
handle
.
descriptor
).
name
());
this
->
missing_flags
.
emplace_back
(
typeid
(
handle
.
descriptor
).
name
());
}
}
flags
.
insert
(
begin
(
handle
.
descriptor
.
flags
),
end
(
handle
.
descriptor
.
flags
));
flags
.
insert
(
begin
(
handle
.
descriptor
.
flags
),
end
(
handle
.
descriptor
.
flags
));
flag_count
+=
size
(
handle
.
descriptor
.
flags
);
flag_count
+=
detail
::
size
(
handle
.
descriptor
.
flags
);
}
}
bool
collective_result
()
const
{
bool
collective_result
()
const
{
bool
flag_conflict
=
(
flag_count
!=
size
(
flags
));
bool
flag_conflict
=
(
flag_count
!=
detail
::
size
(
flags
));
if
(
flag_conflict
)
{
if
(
flag_conflict
)
{
throw
tcli
::
parameter_conflict
(
"Some parameters share the same flags."
);
throw
tcli
::
parameter_conflict
(
"Some parameters share the same flags."
);
}
}
bool
all_named
=
size
(
this
->
missing_flags
)
==
0
;
bool
all_named
=
detail
::
size
(
this
->
missing_flags
)
==
0
;
if
(
!
all_named
)
{
if
(
!
all_named
)
{
std
::
stringstream
sstr
;
std
::
stringstream
sstr
;
sstr
<<
"Some parameters have no flag defined:"
;
sstr
<<
"Some parameters have no flag defined:"
;
...
...
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