#include "simgear/misc/strutils.hxx"
#include "simgear/structure/exception.hxx"
-using std::cout;
-using std::cerr;
-using std::endl;
using std::string;
using namespace simgear;
_url(href),
_container(NULL)
{
- assert(!href.empty());
+ assert(!href.empty());
+ if (strutils::ends_with(href, "/")) {
+ _url = href.substr(0, _url.size() - 1);
+ }
}
void DAVResource::setVersionName(const std::string& aVersion)
assert(res->container() == NULL);
assert(std::find(_contents.begin(), _contents.end(), res) == _contents.end());
-
- if (!strutils::starts_with(res->url(), _url)) {
- std::cerr << "us: " << _url << std::endl;
- std::cerr << "child:" << res->url() << std::endl;
-
- }
-
assert(strutils::starts_with(res->url(), _url));
assert(childWithUrl(res->url()) == NULL);
string tagN(const unsigned int n) const
{
- int sz = tagStack.size();
+ size_t sz = tagStack.size();
if (n >= sz) {
return string();
}