Use Twine instead of StringRef where appropriate. (#259)

Deprecated interfaces were not updated.
This commit is contained in:
Peter Johnson
2017-11-24 20:13:00 -08:00
committed by GitHub
parent 0e4a1c5dae
commit aa2de65bad
19 changed files with 282 additions and 243 deletions

View File

@@ -13,7 +13,7 @@
#include <vector>
#include "llvm/ArrayRef.h"
#include "llvm/StringRef.h"
#include "llvm/Twine.h"
#include "Message.h"
#include "ntcore_cpp.h"
@@ -53,10 +53,10 @@ class IStorage {
// Filename-based save/load functions. Used both by periodic saves and
// accessible directly via the user API.
virtual const char* SavePersistent(StringRef filename,
virtual const char* SavePersistent(const Twine& filename,
bool periodic) const = 0;
virtual const char* LoadPersistent(
StringRef filename,
const Twine& filename,
std::function<void(std::size_t line, const char* msg)> warn) = 0;
};