-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix compilation issues with GCC 4.8 #4
Conversation
@@ -44,7 +44,7 @@ namespace csv { | |||
*/ | |||
|
|||
CSVFormat format = DEFAULT_CSV; | |||
char current_delim; | |||
char current_delim{','}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes possible use without initialization.
@@ -79,7 +79,6 @@ namespace csv { | |||
*/ | |||
|
|||
CSVFormat format = DEFAULT_CSV; | |||
char current_delim; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was unused in this context, so I deleted it.
@@ -43,7 +43,7 @@ namespace csv { | |||
/** Open a file for writing | |||
* @param[out] outfile Path of the file to be written to | |||
*/ | |||
this->outfile = std::ofstream(outfile, std::ios_base::binary); | |||
this->outfile.open(outfile, std::ios_base::binary); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GCC 4.8's libstdc++'s ofstream doesn't support copy or move, so just use open().
Codecov Report
@@ Coverage Diff @@
## master #4 +/- ##
=========================================
- Coverage 96.7% 96.7% -0.01%
=========================================
Files 5 5
Lines 486 485 -1
=========================================
- Hits 470 469 -1
Misses 16 16
Continue to review full report at Codecov.
|
Hi there! Thanks for fixing some issues I've been meaning to get to for a while. -Vince |
Before these changes, building on Ubuntu 14.04 with gcc 4.8 yielded:
After these changes, I have no warnings or errors, and all tests passed: