]> git.saurik.com Git - ldid.git/blobdiff - ldid.cpp
The comment says to use a nullbuf, so let's do it!
[ldid.git] / ldid.cpp
index f5f1bb5ffd94349f153b2a64cd0371a3b02d64a7..0d4cb735e2f6d6b8d971f2f3df87101a61c04129 100644 (file)
--- a/ldid.cpp
+++ b/ldid.cpp
@@ -634,6 +634,7 @@ static std::string der(const std::pair<std::string, std::string> &value) {
     return data.str();
 }
 
+#ifndef LDID_NOPLIST
 static std::string der(plist_t data) {
     switch (const auto type = plist_get_node_type(data)) {
         case PLIST_BOOLEAN: {
@@ -714,6 +715,7 @@ static std::string der(plist_t data) {
         } break;
     }
 }
+#endif
 
 static inline uint16_t Swap_(uint16_t value) {
     return
@@ -2501,8 +2503,7 @@ void DiskFolder::Find(const std::string &root, const std::string &base, const Fu
 
 void DiskFolder::Save(const std::string &path, bool edit, const void *flag, const Functor<void (std::streambuf &)> &code) {
     if (!edit) {
-        // XXX: use nullbuf
-        std::stringbuf save;
+        NullBuffer save;
         code(save);
     } else {
         std::filebuf save;