Convert indentation to spaces

The tab war is lost
This commit is contained in:
topjohnwu
2020-12-30 22:11:24 -08:00
parent 947a7d6a2f
commit f9bde347bc
78 changed files with 10945 additions and 10945 deletions

View File

@ -8,12 +8,12 @@
#define PERSISTENT_PROPERTY_DIR "/data/property"
struct prop_cb {
virtual void exec(const char *name, const char *value) {
exec(std::string(name), value);
}
virtual void exec(std::string &&name, const char *value) {
exec(name.data(), value);
}
virtual void exec(const char *name, const char *value) {
exec(std::string(name), value);
}
virtual void exec(std::string &&name, const char *value) {
exec(name.data(), value);
}
};
extern bool use_pb;
@ -21,15 +21,15 @@ extern bool use_pb;
using prop_list = std::map<std::string, std::string>;
struct prop_collector : prop_cb {
explicit prop_collector(prop_list &list) : list(list) {}
void exec(const char *name, const char *value) override {
list.insert_or_assign(name, value);
}
void exec(std::string &&name, const char *value) override {
list.insert_or_assign(std::move(name), value);
}
explicit prop_collector(prop_list &list) : list(list) {}
void exec(const char *name, const char *value) override {
list.insert_or_assign(name, value);
}
void exec(std::string &&name, const char *value) override {
list.insert_or_assign(std::move(name), value);
}
private:
prop_list &list;
prop_list &list;
};
std::string persist_getprop(const char *name);