Skip to content

Upstream the filesystem changes from OpenTimer #5

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions parser-spef/parser-spef.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <array>
#include <string_view>
#include <optional>
#include <experimental/filesystem>
#include <filesystem>
#include <fstream>
#include <cmath>

Expand Down Expand Up @@ -127,7 +127,7 @@ struct Spef {
void scale_capacitance(float);
void scale_resistance(float);

bool read(const std::experimental::filesystem::path &);
bool read(const std::filesystem::path &);

template <typename T>
friend struct Action;
Expand Down Expand Up @@ -493,7 +493,7 @@ inline std::string Spef::dump_compact() const {
// Procedure: dump_compact
inline void Spef::dump_compact(std::ostream& os) const {

if(not name_map.empty()){
if(!name_map.empty()){
dump(os);
return;
}
Expand Down Expand Up @@ -1156,9 +1156,9 @@ const std::string Control<T>::error_message =


// Procedure:: file_to_memory reads the content of a file to a string buffer
inline std::string file_to_memory(const std::experimental::filesystem::path &p){
inline std::string file_to_memory(const std::filesystem::path &p){

if(not std::experimental::filesystem::exists(p)){
if(not std::filesystem::exists(p)){
return "";
}

Expand All @@ -1174,7 +1174,7 @@ inline std::string file_to_memory(const std::experimental::filesystem::path &p){
}

// Function: read
inline bool Spef::read(const std::experimental::filesystem::path &p){
inline bool Spef::read(const std::filesystem::path &p){

auto buffer {file_to_memory(p)};

Expand Down