mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-28 07:59:37 -06:00
Remove a bunch of compiler warnings
* Remove compile warnings * Coding style fix
This commit is contained in:
@@ -67,7 +67,7 @@ private:
|
||||
Allow
|
||||
};
|
||||
|
||||
properties::OptionProperty _type;
|
||||
properties::OptionProperty _socketType;
|
||||
properties::IntProperty _port;
|
||||
properties::BoolProperty _enabled;
|
||||
properties::StringListProperty _allowAddresses;
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace openspace {
|
||||
class CameraTopic : public Topic {
|
||||
public:
|
||||
CameraTopic();
|
||||
virtual ~CameraTopic();
|
||||
~CameraTopic() override;
|
||||
|
||||
void handleJson(const nlohmann::json& json) override;
|
||||
bool isDone() const override;
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace openspace {
|
||||
class MissionTopic : public Topic {
|
||||
public:
|
||||
MissionTopic() = default;
|
||||
virtual ~MissionTopic() = default;
|
||||
~MissionTopic() override = default;
|
||||
|
||||
void handleJson(const nlohmann::json& json) override;
|
||||
bool isDone() const override;
|
||||
|
||||
@@ -108,7 +108,7 @@ std::unique_ptr<ServerInterface> ServerInterface::createFromDictionary(
|
||||
|
||||
ServerInterface::ServerInterface(const ghoul::Dictionary& config)
|
||||
: properties::PropertyOwner({ "", "", "" })
|
||||
, _type(TypeInfo)
|
||||
, _socketType(TypeInfo)
|
||||
, _port(PortInfo, 0)
|
||||
, _enabled(EnabledInfo)
|
||||
, _allowAddresses(AllowAddressesInfo)
|
||||
@@ -118,11 +118,11 @@ ServerInterface::ServerInterface(const ghoul::Dictionary& config)
|
||||
, _password(PasswordInfo)
|
||||
{
|
||||
|
||||
_type.addOption(
|
||||
_socketType.addOption(
|
||||
static_cast<int>(InterfaceType::TcpSocket),
|
||||
std::string(TcpSocketType)
|
||||
);
|
||||
_type.addOption(
|
||||
_socketType.addOption(
|
||||
static_cast<int>(InterfaceType::WebSocket),
|
||||
std::string(WebSocketType)
|
||||
);
|
||||
@@ -195,7 +195,7 @@ ServerInterface::ServerInterface(const ghoul::Dictionary& config)
|
||||
initialize();
|
||||
};
|
||||
|
||||
_type.onChange(reinitialize);
|
||||
_socketType.onChange(reinitialize);
|
||||
_port.onChange(reinitialize);
|
||||
_enabled.onChange(reinitialize);
|
||||
_defaultAccess.onChange(reinitialize);
|
||||
@@ -203,7 +203,7 @@ ServerInterface::ServerInterface(const ghoul::Dictionary& config)
|
||||
_requirePasswordAddresses.onChange(reinitialize);
|
||||
_denyAddresses.onChange(reinitialize);
|
||||
|
||||
addProperty(_type);
|
||||
addProperty(_socketType);
|
||||
addProperty(_port);
|
||||
addProperty(_enabled);
|
||||
addProperty(_defaultAccess);
|
||||
@@ -219,7 +219,7 @@ void ServerInterface::initialize() {
|
||||
if (!_enabled) {
|
||||
return;
|
||||
}
|
||||
switch (static_cast<InterfaceType>(_type.value())) {
|
||||
switch (static_cast<InterfaceType>(_socketType.value())) {
|
||||
case InterfaceType::TcpSocket:
|
||||
_socketServer = std::make_unique<ghoul::io::TcpSocketServer>();
|
||||
break;
|
||||
|
||||
@@ -71,7 +71,7 @@ nlohmann::json MissionTopic::createPhaseJson(const MissionPhase& phase) const {
|
||||
json subphaseJson = createPhaseJson(missionPhase);
|
||||
phases.push_back(subphaseJson);
|
||||
}
|
||||
|
||||
|
||||
json milestones = json::array();
|
||||
const std::vector<Milestone>& dates = phase.milestones();
|
||||
for (const Milestone& date : dates) {
|
||||
@@ -79,7 +79,7 @@ nlohmann::json MissionTopic::createPhaseJson(const MissionPhase& phase) const {
|
||||
{ "date", std::string(date.date.ISO8601()) },
|
||||
{ "name", date.name }
|
||||
};
|
||||
|
||||
|
||||
if (date.description.has_value()) {
|
||||
jsonDate["description"] = *date.description;;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user