Compare commits
No commits in common. "8f1e3668a3318ad46aaf3b15e6f92be3c04ab848" and "afc163f3449a115f123e6cb6ffd83a251b674b67" have entirely different histories.
8f1e3668a3
...
afc163f344
3 changed files with 3 additions and 13 deletions
|
@ -79,7 +79,7 @@ auto MassManager::importMass(const std::string& staged_fn, int hangar) -> bool {
|
||||||
std::string source = Utility::Directory::join(_stagingAreaDirectory, staged_fn);
|
std::string source = Utility::Directory::join(_stagingAreaDirectory, staged_fn);
|
||||||
Utility::Directory::copy(source, source + ".tmp");
|
Utility::Directory::copy(source, source + ".tmp");
|
||||||
|
|
||||||
if(!Mass{source + ".tmp"}.updateAccount(_steamId))
|
if(!Mass{source + ".tmp"}.updateSteamId(_steamId))
|
||||||
{
|
{
|
||||||
_lastError = "The M.A.S.S. file at " + source + " seems to be corrupt.";
|
_lastError = "The M.A.S.S. file at " + source + " seems to be corrupt.";
|
||||||
Utility::Directory::rm(source + ".tmp");
|
Utility::Directory::rm(source + ".tmp");
|
||||||
|
|
|
@ -102,7 +102,7 @@ auto BinaryWriter::writeDouble(Double value) -> bool {
|
||||||
return std::fwrite(&value, sizeof(Double), 1, _file) == 1;
|
return std::fwrite(&value, sizeof(Double), 1, _file) == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto BinaryWriter::writeArray(Containers::ArrayView<const char> array) -> bool {
|
auto BinaryWriter::writeArray(Containers::ArrayView<char> array) -> bool {
|
||||||
if(array.size() == 0) {
|
if(array.size() == 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,12 +33,6 @@ class BinaryWriter {
|
||||||
explicit BinaryWriter(const std::string& filename);
|
explicit BinaryWriter(const std::string& filename);
|
||||||
~BinaryWriter();
|
~BinaryWriter();
|
||||||
|
|
||||||
BinaryWriter(const BinaryWriter& other) = delete;
|
|
||||||
BinaryWriter& operator=(const BinaryWriter& other) = delete;
|
|
||||||
|
|
||||||
BinaryWriter(BinaryWriter&& other) = default;
|
|
||||||
BinaryWriter& operator=(BinaryWriter&& other) = default;
|
|
||||||
|
|
||||||
auto open() -> bool;
|
auto open() -> bool;
|
||||||
|
|
||||||
void closeFile();
|
void closeFile();
|
||||||
|
@ -59,11 +53,7 @@ class BinaryWriter {
|
||||||
auto writeUnsignedLong(UnsignedLong value) -> bool;
|
auto writeUnsignedLong(UnsignedLong value) -> bool;
|
||||||
auto writeFloat(Float value) -> bool;
|
auto writeFloat(Float value) -> bool;
|
||||||
auto writeDouble(Double value) -> bool;
|
auto writeDouble(Double value) -> bool;
|
||||||
auto writeArray(Containers::ArrayView<const char> array) -> bool;
|
auto writeArray(Containers::ArrayView<char> array) -> bool;
|
||||||
template<std::size_t size>
|
|
||||||
auto writeString(const char(&str)[size]) -> bool {
|
|
||||||
return writeArray({str, size - 1});
|
|
||||||
}
|
|
||||||
|
|
||||||
template<std::size_t S>
|
template<std::size_t S>
|
||||||
auto writeStaticArray(Containers::StaticArrayView<S, const char> array) -> bool {
|
auto writeStaticArray(Containers::StaticArrayView<S, const char> array) -> bool {
|
||||||
|
|
Loading…
Reference in a new issue