BACKENDS: Let ChRootFilesystemFactory's constructor take a const String reference.

This commit is contained in:
Johannes Schickel 2016-01-07 10:57:46 +01:00
parent 557d58af8d
commit 48df726c9e
2 changed files with 4 additions and 4 deletions

View file

@ -30,8 +30,8 @@
#include "backends/fs/chroot/chroot-fs-factory.h" #include "backends/fs/chroot/chroot-fs-factory.h"
#include "backends/fs/chroot/chroot-fs.h" #include "backends/fs/chroot/chroot-fs.h"
ChRootFilesystemFactory::ChRootFilesystemFactory(Common::String root) { ChRootFilesystemFactory::ChRootFilesystemFactory(const Common::String &root)
_root = root; : _root(root) {
} }
AbstractFSNode *ChRootFilesystemFactory::makeRootFileNode() const { AbstractFSNode *ChRootFilesystemFactory::makeRootFileNode() const {

View file

@ -33,14 +33,14 @@
*/ */
class ChRootFilesystemFactory : public FilesystemFactory { class ChRootFilesystemFactory : public FilesystemFactory {
public: public:
ChRootFilesystemFactory(Common::String root); ChRootFilesystemFactory(const Common::String &root);
virtual AbstractFSNode *makeRootFileNode() const; virtual AbstractFSNode *makeRootFileNode() const;
virtual AbstractFSNode *makeCurrentDirectoryFileNode() const; virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const; virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
private: private:
Common::String _root; const Common::String _root;
}; };
#endif /* BACKENDS_FS_CHROOT_CHROOT_FS_FACTORY_H */ #endif /* BACKENDS_FS_CHROOT_CHROOT_FS_FACTORY_H */