mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 19:19:39 -06:00
Add some analyzer suggestions
This commit is contained in:
@@ -174,7 +174,7 @@ public:
|
||||
* \param fadeDuration An optional duration for the fading. If unspecified, use the
|
||||
* JumpToFadeDuration property
|
||||
*/
|
||||
void triggerFadeToTransition(const std::string& transitionScript,
|
||||
void triggerFadeToTransition(std::string transitionScript,
|
||||
std::optional<float> fadeDuration = std::nullopt);
|
||||
|
||||
/**
|
||||
|
||||
@@ -181,7 +181,7 @@ private:
|
||||
void updatePreviousAnchorState();
|
||||
void updatePreviousAimState();
|
||||
|
||||
Camera* _camera;
|
||||
Camera* _camera = nullptr;
|
||||
|
||||
Friction _friction;
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ constexpr KeyAction operator|=(KeyAction& lhs, KeyAction rhs) {
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
enum class KeyModifier : uint8_t {
|
||||
None = 0,
|
||||
None = 0x00,
|
||||
Shift = 0x01,
|
||||
Control = 0x02,
|
||||
Alt = 0x04,
|
||||
|
||||
@@ -30,7 +30,10 @@ template<class T>
|
||||
SyncData<T>::SyncData(const T& val) : _data(val) {}
|
||||
|
||||
template<class T>
|
||||
SyncData<T>::SyncData(const SyncData<T>& o) : _data(o._data) {}
|
||||
SyncData<T>::SyncData(const SyncData<T>& o)
|
||||
: _data(o._data)
|
||||
, _doubleBufferedData(o._doubleBufferedData)
|
||||
{}
|
||||
|
||||
template<class T>
|
||||
SyncData<T>& SyncData<T>::operator=(const T& rhs) {
|
||||
|
||||
@@ -194,14 +194,14 @@ void NavigationHandler::setInterpolationTime(float durationInSeconds) {
|
||||
_orbitalNavigator.setRetargetInterpolationTime(durationInSeconds);
|
||||
}
|
||||
|
||||
void NavigationHandler::triggerFadeToTransition(const std::string& transitionScript,
|
||||
void NavigationHandler::triggerFadeToTransition(std::string transitionScript,
|
||||
std::optional<float> fadeDuration)
|
||||
{
|
||||
const float duration = fadeDuration.value_or(_jumpToFadeDuration);
|
||||
|
||||
std::string script;
|
||||
if (duration < std::numeric_limits<float>::epsilon()) {
|
||||
script = transitionScript;
|
||||
script = std::move(transitionScript);
|
||||
}
|
||||
else {
|
||||
const std::string onArrivalScript = std::format(
|
||||
|
||||
@@ -1256,7 +1256,7 @@ localPositionFromGeoDeprecated(std::string nodeIdentifier, double latitude,
|
||||
|
||||
bool setTime = (ns.timestamp.has_value() && useTimeStamp.value_or(false));
|
||||
|
||||
const std::string script = std::format(
|
||||
std::string script = std::format(
|
||||
"openspace.navigation.setNavigationState({}, {})",
|
||||
ghoul::formatLua(ns.dictionary()), setTime
|
||||
);
|
||||
@@ -1268,7 +1268,7 @@ localPositionFromGeoDeprecated(std::string nodeIdentifier, double latitude,
|
||||
);
|
||||
}
|
||||
else {
|
||||
global::navigationHandler->triggerFadeToTransition(script);
|
||||
global::navigationHandler->triggerFadeToTransition(std::move(script));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1288,7 +1288,7 @@ localPositionFromGeoDeprecated(std::string nodeIdentifier, double latitude,
|
||||
throw ghoul::lua::LuaError("Unknown node name: " + nodeIdentifier);
|
||||
}
|
||||
|
||||
const std::string script = std::format(
|
||||
std::string script = std::format(
|
||||
"openspace.navigation.flyTo('{}', 0)", nodeIdentifier
|
||||
);
|
||||
|
||||
@@ -1299,7 +1299,7 @@ localPositionFromGeoDeprecated(std::string nodeIdentifier, double latitude,
|
||||
);
|
||||
}
|
||||
else {
|
||||
global::navigationHandler->triggerFadeToTransition(script);
|
||||
global::navigationHandler->triggerFadeToTransition(std::move(script));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user