Freqman improvements (#1276)

* Show .1 MHz in pretty freqman string

* Refactor load to user FreqmanDB

* Recon file parsing cleanup

* use strtol for parse_int

* recon file cleanup

* Fix bugs in Recon changes

* PR feedback

---------

Co-authored-by: kallanreed <kallanreed@noreply.github.com>
This commit is contained in:
Kyle Reed 2023-07-17 11:43:37 -07:00 committed by GitHub
parent f5c4aa2be2
commit 6574272ca8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 433 additions and 434 deletions

View file

@ -463,9 +463,9 @@ class FileWrapper : public BufferWrapper<File, 64> {
template <typename T>
using Result = File::Result<T>;
using Error = File::Error;
static Result<std::unique_ptr<FileWrapper>> open(const std::filesystem::path& path) {
static Result<std::unique_ptr<FileWrapper>> open(const std::filesystem::path& path, bool create = false) {
auto fw = std::unique_ptr<FileWrapper>(new FileWrapper());
auto error = fw->file_.open(path, /*read_only*/ false);
auto error = fw->file_.open(path, /*read_only*/ false, create);
if (error)
return *error;