Skip to content

Commit

Permalink
Refactor: Removed Uri::Segment's parent pointer as unnecessary
Browse files Browse the repository at this point in the history
Now that the segments are not stored in a manually managed linked list,
there is no need for the parent pointer any more.
  • Loading branch information
skyjake committed Nov 18, 2012
1 parent a00bc49 commit e6231d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
18 changes: 7 additions & 11 deletions doomsday/engine/include/uri.hh
Expand Up @@ -102,23 +102,20 @@ public:
struct Segment
{
/**
* Returns a somewhat-random number in the range [0..Uri::hash_range)
* generated from the segment.
*
* @return The generated hash key.
* Returns the segment as a string.
*/
hash_type hash() const;
String toString() const;

/// @return Length of the segment in characters.
int length() const;

/// @return Parent (previous) segment or @c NULL.
Segment* parent() const;

/**
* Returns the segment as a string.
* Returns a somewhat-random number in the range [0..Uri::hash_range)
* generated from the segment.
*
* @return The generated hash key.
*/
String toString() const;
hash_type hash() const;

friend class Uri;
friend struct Uri::Instance;
Expand All @@ -127,7 +124,6 @@ public:
mutable bool haveHashKey;
mutable hash_type hashKey;
char const* from, *to;
struct Segment* parent_;
};

public:
Expand Down
5 changes: 0 additions & 5 deletions doomsday/engine/src/uri.cpp
Expand Up @@ -41,11 +41,6 @@

namespace de {

Uri::Segment* Uri::Segment::parent() const
{
return parent_;
}

ushort Uri::Segment::hash() const
{
// Is it time to compute the hash?
Expand Down

0 comments on commit e6231d5

Please sign in to comment.