diff --git a/trunk/src/core/srs_core.cpp b/trunk/src/core/srs_core.cpp index 9ec0f1060..29b882ebe 100644 --- a/trunk/src/core/srs_core.cpp +++ b/trunk/src/core/srs_core.cpp @@ -52,14 +52,14 @@ bool _SrsContextId::empty() const return v_.empty(); } +int _SrsContextId::compare(const _SrsContextId& to) const +{ + return v_.compare(to.v_); +} + _SrsContextId& _SrsContextId::set_value(const std::string& v) { v_ = v; return *this; } -int _SrsContextId::compare(const _SrsContextId& to) const -{ - return v_.compare(to.v_); -} - diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index c71b54378..e3dd74ce9 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -130,13 +130,13 @@ public: public: const char* c_str() const; bool empty() const; - // Set the value of context id. - _SrsContextId& set_value(const std::string& v); // Compare the two context id. @see http://www.cplusplus.com/reference/string/string/compare/ // 0 They compare equal // <0 Either the value of the first character that does not match is lower in the compared string, or all compared characters match but the compared string is shorter. // >0 Either the value of the first character that does not match is greater in the compared string, or all compared characters match but the compared string is longer. int compare(const _SrsContextId& to) const; + // Set the value of context id. + _SrsContextId& set_value(const std::string& v); }; typedef _SrsContextId SrsContextId; #else