Merge pull request #6453 from leoetlino/remove-unused

State: Remove unused Verify functions
This commit is contained in:
Léo Lam 2018-03-18 11:24:37 +01:00 committed by GitHub
commit b86947264b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 37 deletions

View File

@ -231,15 +231,6 @@ void SaveToBuffer(std::vector<u8>& buffer)
}); });
} }
void VerifyBuffer(std::vector<u8>& buffer)
{
Core::RunAsCPUThread([&] {
u8* ptr = &buffer[0];
PointerWrap p(&ptr, PointerWrap::MODE_VERIFY);
DoState(p);
});
}
// return state number not in map // return state number not in map
static int GetEmptySlot(std::map<double, int> m) static int GetEmptySlot(std::map<double, int> m)
{ {
@ -609,26 +600,6 @@ void SetOnAfterLoadCallback(AfterLoadCallbackFunc callback)
s_on_after_load_callback = std::move(callback); s_on_after_load_callback = std::move(callback);
} }
void VerifyAt(const std::string& filename)
{
Core::RunAsCPUThread([&] {
std::vector<u8> buffer;
LoadFileStateData(filename, buffer);
if (!buffer.empty())
{
u8* ptr = &buffer[0];
PointerWrap p(&ptr, PointerWrap::MODE_VERIFY);
DoState(p);
if (p.GetMode() == PointerWrap::MODE_VERIFY)
Core::DisplayMessage(StringFromFormat("Verified state at %s", filename.c_str()), 2000);
else
Core::DisplayMessage("Unable to Verify : Can't verify state from other revisions !", 4000);
}
});
}
void Init() void Init()
{ {
if (lzo_init() != LZO_E_OK) if (lzo_init() != LZO_E_OK)
@ -669,11 +640,6 @@ void Load(int slot)
LoadAs(MakeStateFilename(slot)); LoadAs(MakeStateFilename(slot));
} }
void Verify(int slot)
{
VerifyAt(MakeStateFilename(slot));
}
void LoadLastSaved(int i) void LoadLastSaved(int i)
{ {
std::map<double, int> savedStates = GetSavedStates(); std::map<double, int> savedStates = GetSavedStates();

View File

@ -43,15 +43,12 @@ std::string GetInfoStringOfSlot(int slot, bool translate = true);
// Slots from 0-99. // Slots from 0-99.
void Save(int slot, bool wait = false); void Save(int slot, bool wait = false);
void Load(int slot); void Load(int slot);
void Verify(int slot);
void SaveAs(const std::string& filename, bool wait = false); void SaveAs(const std::string& filename, bool wait = false);
void LoadAs(const std::string& filename); void LoadAs(const std::string& filename);
void VerifyAt(const std::string& filename);
void SaveToBuffer(std::vector<u8>& buffer); void SaveToBuffer(std::vector<u8>& buffer);
void LoadFromBuffer(std::vector<u8>& buffer); void LoadFromBuffer(std::vector<u8>& buffer);
void VerifyBuffer(std::vector<u8>& buffer);
void LoadLastSaved(int i = 1); void LoadLastSaved(int i = 1);
void SaveFirstSaved(); void SaveFirstSaved();