mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Introduce std::string_view
into wider use (#14368)
This commit is contained in:
parent
fa47af737f
commit
6ca214fefc
74 changed files with 501 additions and 456 deletions
|
@ -19,12 +19,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
#include "irr_v3d.h"
|
||||
#include "irrlichttypes.h"
|
||||
#include "util/basic_macros.h"
|
||||
#include "util/string.h"
|
||||
|
||||
class Database
|
||||
|
@ -40,7 +39,7 @@ class MapDatabase : public Database
|
|||
public:
|
||||
virtual ~MapDatabase() = default;
|
||||
|
||||
virtual bool saveBlock(const v3s16 &pos, const std::string &data) = 0;
|
||||
virtual bool saveBlock(const v3s16 &pos, std::string_view data) = 0;
|
||||
virtual void loadBlock(const v3s16 &pos, std::string *block) = 0;
|
||||
virtual bool deleteBlock(const v3s16 &pos) = 0;
|
||||
|
||||
|
@ -97,7 +96,7 @@ public:
|
|||
virtual bool getModEntry(const std::string &modname,
|
||||
const std::string &key, std::string *value) = 0;
|
||||
virtual bool setModEntry(const std::string &modname,
|
||||
const std::string &key, const std::string &value) = 0;
|
||||
const std::string &key, std::string_view value) = 0;
|
||||
virtual bool removeModEntry(const std::string &modname, const std::string &key) = 0;
|
||||
virtual bool removeModEntries(const std::string &modname) = 0;
|
||||
virtual void listMods(std::vector<std::string> *res) = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue