mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Persist the original radio name, and restore it on app start if the radio name is our radio name.
PiperOrigin-RevId: 464148898
This commit is contained in:
committed by
Copybara-Service
parent
0d4964da7b
commit
778c77eacd
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <ios>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
@@ -35,9 +36,11 @@ std::unique_ptr<IOFile> IOFile::CreateInputFile(
|
||||
|
||||
IOFile::IOFile(const absl::string_view file_path, size_t size)
|
||||
: file_(std::string(file_path.data(), file_path.size()),
|
||||
std::ios::binary | std::ios::in),
|
||||
std::ios::binary | std::ios::in | std::ios::ate),
|
||||
path_(file_path),
|
||||
total_size_(size) {}
|
||||
total_size_(file_.tellg()) {
|
||||
file_.seekg(0);
|
||||
}
|
||||
|
||||
std::unique_ptr<IOFile> IOFile::CreateOutputFile(const absl::string_view path) {
|
||||
return std::unique_ptr<IOFile>(new IOFile(path));
|
||||
|
||||
Reference in New Issue
Block a user