Accomodate older versions of boost::filesystem
The return type of the path methods has changed in newer version of Boost; by wrapping them with a new path object we can get a string in a way that is compatible for both version 2 and 3. Hat tip: @bska
This commit is contained in:
parent
b0b50618d0
commit
39e7943618
@ -807,12 +807,13 @@ EclipseWriter::EclipseWriter (
|
||||
, uses_ (phaseUsageFromDeck (parser)) {
|
||||
|
||||
// get the base name from the name of the deck
|
||||
boost::filesystem::path deck (params.get <std::string> ("deck_filename"));
|
||||
if (boost::to_upper_copy (deck.extension ().string ()) == ".DATA") {
|
||||
baseName_ = deck.stem ().string ();
|
||||
using boost::filesystem::path;
|
||||
path deck (params.get <std::string> ("deck_filename"));
|
||||
if (boost::to_upper_copy (path (deck.extension ()).string ()) == ".DATA") {
|
||||
baseName_ = path (deck.stem ()).string ();
|
||||
}
|
||||
else {
|
||||
baseName_ = deck.filename ().string ();
|
||||
baseName_ = path (deck.filename ()).string ();
|
||||
}
|
||||
|
||||
// store in current directory if not explicitly set
|
||||
|
Loading…
Reference in New Issue
Block a user