Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aevol-eukaryotes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
LUISELLI Juliette
aevol-eukaryotes
Commits
cf3b6cdf
Commit
cf3b6cdf
authored
1 year ago
by
David Parsons
Browse files
Options
Downloads
Patches
Plain Diff
make chromosome_file_name a string
parent
676384c4
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
src/aevol_create.cpp
+3
-5
3 additions, 5 deletions
src/aevol_create.cpp
with
3 additions
and
5 deletions
src/aevol_create.cpp
+
3
−
5
View file @
cf3b6cdf
...
...
@@ -58,7 +58,7 @@ void interpret_cmd_line_options(int argc, char* argv[]);
// Command-line option variables
static
char
*
param_file_name
=
nullptr
;
static
char
*
chromosome_file_name
=
nullptr
;
static
std
::
string
chromosome_file_name
;
int
main
(
int
argc
,
char
*
argv
[])
{
interpret_cmd_line_options
(
argc
,
argv
);
...
...
@@ -76,7 +76,7 @@ int main(int argc, char* argv[]) {
// Initialize the simulation from the parameter file
std
::
list
<
std
::
string
>
chromosomes
;
if
(
chromosome_file_name
!=
nullptr
)
{
if
(
chromosome_file_name
.
length
()
!=
0
)
{
std
::
ifstream
chromosome_file
(
chromosome_file_name
);
if
(
not
chromosome_file
)
{
Utils
::
ExitWithUsrMsg
(
std
::
string
(
"failed to open source chromosome file "
)
+
chromosome_file_name
);
...
...
@@ -91,7 +91,6 @@ int main(int argc, char* argv[]) {
std
::
cout
<<
"Loading chromosome from text file "
<<
chromosome_file_name
<<
" ("
<<
chromosomes
.
front
().
length
()
<<
" base pairs)"
<<
std
::
endl
;
delete
[]
chromosome_file_name
;
}
if
(
param_file_name
!=
nullptr
)
{
...
...
@@ -182,8 +181,7 @@ void interpret_cmd_line_options(int argc, char* argv[]) {
break
;
}
case
'C'
:
{
chromosome_file_name
=
new
char
[
strlen
(
optarg
)
+
1
];
strcpy
(
chromosome_file_name
,
optarg
);
chromosome_file_name
=
optarg
;
break
;
}
default
:
{
...
...
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