]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/LoadableModule.h
Convert loadable_modules to SBufList (#1738)
[thirdparty/squid.git] / src / LoadableModule.h
index 3c246758153adf9bb7c47c850f9a73c195333642..8601b4984eb125af566797dcdcd7fbdf2a642221 100644 (file)
@@ -9,26 +9,26 @@
 #ifndef SQUID_SRC_LOADABLEMODULE_H
 #define SQUID_SRC_LOADABLEMODULE_H
 
-#include "SquidString.h"
+#include "sbuf/SBuf.h"
 
 // wrapper for dlopen(3), libltdl, and friends
 class LoadableModule
 {
 public:
-    LoadableModule(const String &aName);
+    explicit LoadableModule(const SBuf &aName);
     ~LoadableModule();           // unloads if loaded
 
     bool loaded() const;
-    const String &name() const { return theName; }
-    const String &error() const { return theError; }
+    const auto &name() const { return theName; }
+    const auto &error() const { return theError; }
 
     void load(); // throws Texc
     void unload(); // throws Texc
 
 protected:
-    String theName;
-    String theError;
-    void *theHandle;
+    SBuf theName;
+    SBuf theError;
+    void *theHandle = nullptr;
 
 private:
     void *openModule();