Skip to content
Snippets Groups Projects
Verified Commit 4d287a94 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

remove leading newlines when noemptylinemacro is passed

parent 81c43cca
No related branches found
No related tags found
No related merge requests found
/*
* Copyright (C) 2015-2017 Dynare Team
* Copyright (C) 2015-2019 Dynare Team
*
* This file is part of Dynare.
*
......@@ -47,7 +47,10 @@ main1(const string &filename, const string &basename, istream &modfile, bool deb
string str (macro_output.str());
if (no_empty_line_macro)
{
str.erase(0, str.find_first_not_of('\n'));
str.erase(unique(str.begin(), str.end(), compareNewline), str.end());
}
macro_output_file << str;
macro_output_file.close();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment