void Path::init(const string &p)
{
- unsigned start=0;
+ string::size_type start=0;
if(p[0]=='/' || p[0]=='\\')
add_component(string(1, DIRSEP));
while(1)
{
- unsigned slash=p.find_first_of("/\\", start);
+ string::size_type slash=p.find_first_of("/\\", start);
if(slash>start)
add_component(p.substr(start, slash-start));
if(slash==string::npos)
#endif
else
{
- unsigned slash=path.rfind(DIRSEP);
- unsigned start=(slash==string::npos ? 0 : slash+1);
+ string::size_type slash=path.rfind(DIRSEP);
+ string::size_type start=(slash==string::npos ? 0 : slash+1);
if(!path.compare(start, string::npos, ".."))
{
// If the last component already is a .., add another