Browse Source

Reordered Candidate getters

Paul-Louis Ageneau 4 years ago
parent
commit
1a6dcdce6f
2 changed files with 9 additions and 10 deletions
  1. 3 4
      include/rtc/candidate.hpp
  2. 6 6
      src/candidate.cpp

+ 3 - 4
include/rtc/candidate.hpp

@@ -40,6 +40,9 @@ public:
 	enum class ResolveMode { Simple, Lookup };
 	enum class ResolveMode { Simple, Lookup };
 	bool resolve(ResolveMode mode = ResolveMode::Simple);
 	bool resolve(ResolveMode mode = ResolveMode::Simple);
 
 
+	Type type() const;
+	TransportType transportType() const;
+	uint32_t priority() const;
 	string candidate() const;
 	string candidate() const;
 	string mid() const;
 	string mid() const;
 	operator string() const;
 	operator string() const;
@@ -47,10 +50,6 @@ public:
 	bool operator==(const Candidate &other) const;
 	bool operator==(const Candidate &other) const;
 	bool operator!=(const Candidate &other) const;
 	bool operator!=(const Candidate &other) const;
 
 
-	Type type() const;
-	TransportType transportType() const;
-	uint32_t priority() const;
-
 	bool isResolved() const;
 	bool isResolved() const;
 	Family family() const;
 	Family family() const;
 	std::optional<string> address() const;
 	std::optional<string> address() const;

+ 6 - 6
src/candidate.cpp

@@ -171,6 +171,12 @@ bool Candidate::resolve(ResolveMode mode) {
 	return mFamily != Family::Unresolved;
 	return mFamily != Family::Unresolved;
 }
 }
 
 
+Candidate::Type Candidate::type() const { return mType; }
+
+Candidate::TransportType Candidate::transportType() const { return mTransportType; }
+
+uint32_t Candidate::priority() const { return mPriority; }
+
 string Candidate::candidate() const {
 string Candidate::candidate() const {
 	const char sp{' '};
 	const char sp{' '};
 	std::ostringstream oss;
 	std::ostringstream oss;
@@ -201,12 +207,6 @@ bool Candidate::operator!=(const Candidate &other) const {
 	return mFoundation != other.mFoundation;
 	return mFoundation != other.mFoundation;
 }
 }
 
 
-Candidate::Type Candidate::type() const { return mType; }
-
-Candidate::TransportType Candidate::transportType() const { return mTransportType; }
-
-uint32_t Candidate::priority() const { return mPriority; }
-
 bool Candidate::isResolved() const { return mFamily != Family::Unresolved; }
 bool Candidate::isResolved() const { return mFamily != Family::Unresolved; }
 
 
 Candidate::Family Candidate::family() const { return mFamily; }
 Candidate::Family Candidate::family() const { return mFamily; }