uri-library
uri-library copied to clipboard
Fix to_string() method and change replacement constructor
I noticed that
auto original = uri{some_string};
auto copy1 = original; // copy assignment
auto copy2 = uri{original, {}}; // replacement ctor
results in copy1 != copy2, and therefore copy1.to_string() != copy2.to_string(). I believe this is not the desired behaviour.
Also I didn't understand this condition in to_string() method:
if (m_content.length() > m_path.length())
so I made it m_category dependent.