mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 20:58:38 +02:00
Fix gcc error about defining templates outside their namespace
Also warning about hiding virtual function.
This commit is contained in:
parent
d6f755955d
commit
a8dd7b7e1f
2 changed files with 4 additions and 1 deletions
|
@ -45,6 +45,7 @@ public:
|
||||||
using HRCTime = p_high_resolution_clock::time_point;
|
using HRCTime = p_high_resolution_clock::time_point;
|
||||||
using PerNodeTraitVersions = std::unordered_map<Node::LocalID, AvatarTraits::TraitVersions>;
|
using PerNodeTraitVersions = std::unordered_map<Node::LocalID, AvatarTraits::TraitVersions>;
|
||||||
|
|
||||||
|
using NodeData::parseData; // Avoid clang warning about hiding.
|
||||||
int parseData(ReceivedMessage& message, const SlaveSharedData& SlaveSharedData);
|
int parseData(ReceivedMessage& message, const SlaveSharedData& SlaveSharedData);
|
||||||
MixerAvatar& getAvatar() { return *_avatar; }
|
MixerAvatar& getAvatar() { return *_avatar; }
|
||||||
const MixerAvatar& getAvatar() const { return *_avatar; }
|
const MixerAvatar& getAvatar() const { return *_avatar; }
|
||||||
|
|
|
@ -308,7 +308,8 @@ namespace {
|
||||||
} // Close anonymous namespace.
|
} // Close anonymous namespace.
|
||||||
|
|
||||||
// Specialize computePriority() for avatars:
|
// Specialize computePriority() for avatars:
|
||||||
template<> float PrioritySortUtil::PriorityQueue<SortableAvatar>::computePriority(const SortableAvatar& thing) const {
|
namespace PrioritySortUtil {
|
||||||
|
template<> float PriorityQueue<SortableAvatar>::computePriority(const SortableAvatar& thing) const {
|
||||||
static constexpr float AVATAR_HERO_BONUS { 25.0f }; // Higher than any normal priority.
|
static constexpr float AVATAR_HERO_BONUS { 25.0f }; // Higher than any normal priority.
|
||||||
|
|
||||||
float priority = std::numeric_limits<float>::min();
|
float priority = std::numeric_limits<float>::min();
|
||||||
|
@ -323,6 +324,7 @@ template<> float PrioritySortUtil::PriorityQueue<SortableAvatar>::computePriorit
|
||||||
|
|
||||||
return priority;
|
return priority;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) {
|
void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node) {
|
||||||
const float AVATAR_HERO_FRACTION { 0.4f };
|
const float AVATAR_HERO_FRACTION { 0.4f };
|
||||||
|
|
Loading…
Reference in a new issue