X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Ffs%2Fpath.cpp;h=784c6eb508cbd953629e0b3819ea82667e083566;hp=f742b11241aeb280e46322793b68ebbb37fa6aea;hb=427991f60b200fe4a6517e6fb1fe1980ab14983b;hpb=7563bb650aa11207a7c128ba44468cf5ad2897c7 diff --git a/source/fs/path.cpp b/source/fs/path.cpp index f742b11..784c6eb 100644 --- a/source/fs/path.cpp +++ b/source/fs/path.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include "path.h" #include "utils.h" @@ -73,11 +73,6 @@ Path Path::operator/(const Path &p) const return a; } -/** -Attaches another path to the end of this one. An absolute path replaces the -existing data. ".." elements annihilate the last component and "." elements -are ignored. -*/ Path &Path::operator/=(const Path &p) { if(p.is_absolute()) @@ -108,7 +103,7 @@ string Path::operator[](int n) const } } - throw InvalidParameterValue("Path component index out of range"); + throw invalid_argument("Path::operator[]"); } bool Path::operator==(const Path &p) const @@ -148,10 +143,6 @@ void Path::init(const string &p) } } -/** -Adds a single component to the path, emulating the cd command. Fails horribly -if comp contains a separator character. -*/ void Path::add_component(const string &comp) { if(comp.empty())