Tidying
This commit is contained in:
@@ -42,6 +42,15 @@ namespace Bloom
|
||||
for (const auto& snapshotFileEntry : snapshotFileEntries) {
|
||||
auto snapshotFile = QFile(snapshotFileEntry.absoluteFilePath());
|
||||
|
||||
if (snapshots.size() >= MAX_SNAPSHOTS) {
|
||||
Logger::warning(
|
||||
"The total number of " + EnumToStringMappings::targetMemoryTypes.at(memoryType).toUpper().toStdString()
|
||||
+ " snapshots exceeds the hard limit of " + std::to_string(MAX_SNAPSHOTS)
|
||||
+ ". Only the most recent " + std::to_string(MAX_SNAPSHOTS) + " snapshots will be loaded."
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
try {
|
||||
if (!snapshotFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
throw Exceptions::Exception("Failed to open snapshot file");
|
||||
@@ -57,15 +66,6 @@ namespace Bloom
|
||||
}
|
||||
|
||||
snapshotFile.close();
|
||||
|
||||
if (snapshots.size() >= MAX_SNAPSHOTS) {
|
||||
Logger::warning(
|
||||
"The total number of " + EnumToStringMappings::targetMemoryTypes.at(memoryType).toUpper().toStdString()
|
||||
+ " snapshots exceeds the hard limit of " + std::to_string(MAX_SNAPSHOTS)
|
||||
+ ". Only the most recent " + std::to_string(MAX_SNAPSHOTS) + " snapshots will be loaded."
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return snapshots;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "MemorySnapshot.hpp"
|
||||
|
||||
#include <QUuid>
|
||||
#include <QByteArray>
|
||||
#include <QJsonArray>
|
||||
|
||||
@@ -18,7 +19,8 @@ namespace Bloom
|
||||
const std::vector<FocusedMemoryRegion>& focusedRegions,
|
||||
const std::vector<ExcludedMemoryRegion>& excludedRegions
|
||||
)
|
||||
: name(name)
|
||||
: id(QUuid::createUuid().toString(QUuid::StringFormat::WithoutBraces))
|
||||
, name(name)
|
||||
, description(description)
|
||||
, memoryType(memoryType)
|
||||
, data(data)
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include <QString>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <QUuid>
|
||||
#include <QJsonObject>
|
||||
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
@@ -18,7 +17,7 @@ namespace Bloom
|
||||
struct MemorySnapshot
|
||||
{
|
||||
public:
|
||||
QString id = QUuid::createUuid().toString(QUuid::StringFormat::WithoutBraces);
|
||||
QString id;
|
||||
QString name;
|
||||
QString description;
|
||||
Targets::TargetMemoryType memoryType;
|
||||
|
||||
Reference in New Issue
Block a user