aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/fs.h7
-rw-r--r--common/str.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/common/fs.h b/common/fs.h
index b5b88ba8cb..f516bf7a9c 100644
--- a/common/fs.h
+++ b/common/fs.h
@@ -57,7 +57,14 @@ class FSList : public Array<FSNode> {};
*/
class FSNode : public ArchiveMember {
private:
+ friend class ::AbstractFSNode;
SharedPtr<AbstractFSNode> _realNode;
+ /**
+ * Construct a FSNode from a backend's AbstractFSNode implementation.
+ *
+ * @param realNode Pointer to a heap allocated instance. FSNode will take
+ * ownership of the pointer.
+ */
FSNode(AbstractFSNode *realNode);
public:
diff --git a/common/str.h b/common/str.h
index dede87a005..a30dae3513 100644
--- a/common/str.h
+++ b/common/str.h
@@ -180,6 +180,7 @@ public:
inline uint size() const { return _size; }
inline bool empty() const { return (_size == 0); }
+ char firstChar() const { return (_size > 0) ? _str[0] : 0; }
char lastChar() const { return (_size > 0) ? _str[_size - 1] : 0; }
char operator[](int idx) const {