mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 23:10:05 +00:00
General GCC compilation fixes
This commit is contained in:
parent
c7aba95233
commit
023688b746
19 changed files with 57 additions and 53 deletions
|
|
@ -29,7 +29,7 @@ static bool initialized_ {false};
|
|||
static std::unordered_map<std::string, std::string> countyMap_;
|
||||
static std::shared_mutex countyMutex_;
|
||||
|
||||
void CountyDatabase::Initialize()
|
||||
void Initialize()
|
||||
{
|
||||
if (initialized_)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -255,8 +255,8 @@ void GeoLine::Impl::Update()
|
|||
const float ty = points_[1].longitude_;
|
||||
|
||||
// Offset x/y in pixels
|
||||
const float ox = width_ * 0.5f * std::cosf(angle_);
|
||||
const float oy = width_ * 0.5f * std::sinf(angle_);
|
||||
const float ox = width_ * 0.5f * cosf(angle_);
|
||||
const float oy = width_ * 0.5f * sinf(angle_);
|
||||
|
||||
// Texture coordinates
|
||||
const float ls = texture_.sLeft_;
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ public:
|
|||
z_ {0.0f},
|
||||
width_ {0.0f},
|
||||
height_ {0.0f},
|
||||
borderColor_ {0, 0, 0, 0},
|
||||
borderWidth_ {0.0f},
|
||||
borderColor_ {0, 0, 0, 0},
|
||||
fillColor_ {std::nullopt},
|
||||
shaderProgram_ {nullptr},
|
||||
uMVPMatrixLocation_(GL_INVALID_INDEX),
|
||||
|
|
|
|||
|
|
@ -362,7 +362,7 @@ RadarProductManager::coordinates(common::RadialSize radialSize) const
|
|||
return p->coordinates1Degree_;
|
||||
}
|
||||
|
||||
throw std::exception("Invalid radial size");
|
||||
throw std::invalid_argument("Invalid radial size");
|
||||
}
|
||||
|
||||
float RadarProductManager::gate_size() const
|
||||
|
|
|
|||
|
|
@ -26,12 +26,13 @@ static const auto logger_ = scwx::util::Logger::Create(logPrefix_);
|
|||
class ColorTableLayerImpl
|
||||
{
|
||||
public:
|
||||
explicit ColorTableLayerImpl(std::shared_ptr<MapContext> context) :
|
||||
explicit ColorTableLayerImpl() :
|
||||
shaderProgram_(nullptr),
|
||||
uMVPMatrixLocation_(GL_INVALID_INDEX),
|
||||
vbo_ {GL_INVALID_INDEX},
|
||||
vao_ {GL_INVALID_INDEX},
|
||||
texture_ {GL_INVALID_INDEX},
|
||||
colorTable_ {},
|
||||
colorTableNeedsUpdate_ {true}
|
||||
{
|
||||
}
|
||||
|
|
@ -50,7 +51,7 @@ public:
|
|||
};
|
||||
|
||||
ColorTableLayer::ColorTableLayer(std::shared_ptr<MapContext> context) :
|
||||
GenericLayer(context), p(std::make_unique<ColorTableLayerImpl>(context))
|
||||
GenericLayer(context), p(std::make_unique<ColorTableLayerImpl>())
|
||||
{
|
||||
}
|
||||
ColorTableLayer::~ColorTableLayer() = default;
|
||||
|
|
|
|||
|
|
@ -502,8 +502,8 @@ void MapWidget::SetMapLocation(double latitude,
|
|||
double longitude,
|
||||
bool updateRadarSite)
|
||||
{
|
||||
if (p->map_ != nullptr && p->prevLatitude_ != latitude ||
|
||||
p->prevLongitude_ != longitude)
|
||||
if (p->map_ != nullptr &&
|
||||
(p->prevLatitude_ != latitude || p->prevLongitude_ != longitude))
|
||||
{
|
||||
// Update the map location
|
||||
p->map_->setCoordinate({latitude, longitude});
|
||||
|
|
@ -787,6 +787,9 @@ void MapWidget::mapChanged(QMapLibreGL::Map::MapChange mapChange)
|
|||
case QMapLibreGL::Map::MapChangeDidFinishLoadingStyle:
|
||||
AddLayers();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -112,11 +112,6 @@ void OverlayLayer::Render(
|
|||
p->sweepTimeNeedsUpdate_ = false;
|
||||
}
|
||||
|
||||
glm::mat4 projection = glm::ortho(0.0f,
|
||||
static_cast<float>(params.width),
|
||||
0.0f,
|
||||
static_cast<float>(params.height));
|
||||
|
||||
// Active Box
|
||||
p->activeBoxOuter_->SetVisible(settings.isActive_);
|
||||
p->activeBoxInner_->SetVisible(settings.isActive_);
|
||||
|
|
@ -139,7 +134,7 @@ void OverlayLayer::Render(
|
|||
nullptr,
|
||||
ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize |
|
||||
ImGuiWindowFlags_AlwaysAutoResize);
|
||||
ImGui::Text(productName.c_str());
|
||||
ImGui::TextUnformatted(productName.c_str());
|
||||
ImGui::End();
|
||||
}
|
||||
}
|
||||
|
|
@ -154,7 +149,7 @@ void OverlayLayer::Render(
|
|||
nullptr,
|
||||
ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize |
|
||||
ImGuiWindowFlags_AlwaysAutoResize);
|
||||
ImGui::Text(p->sweepTimeString_.c_str());
|
||||
ImGui::TextUnformatted(p->sweepTimeString_.c_str());
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ LatLongToScreenCoordinate(const QMapLibreGL::Coordinate& coordinate);
|
|||
class RadarProductLayerImpl
|
||||
{
|
||||
public:
|
||||
explicit RadarProductLayerImpl(std::shared_ptr<MapContext> context) :
|
||||
explicit RadarProductLayerImpl() :
|
||||
shaderProgram_(nullptr),
|
||||
uMVPMatrixLocation_(GL_INVALID_INDEX),
|
||||
uMapScreenCoordLocation_(GL_INVALID_INDEX),
|
||||
|
|
@ -75,7 +75,7 @@ public:
|
|||
};
|
||||
|
||||
RadarProductLayer::RadarProductLayer(std::shared_ptr<MapContext> context) :
|
||||
GenericLayer(context), p(std::make_unique<RadarProductLayerImpl>(context))
|
||||
GenericLayer(context), p(std::make_unique<RadarProductLayerImpl>())
|
||||
{
|
||||
}
|
||||
RadarProductLayer::~RadarProductLayer() = default;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ QVariant ImGuiContextModel::data(const QModelIndex& index, int role) const
|
|||
}
|
||||
|
||||
const int row = index.row();
|
||||
if (row >= p->contexts_.size() || row < 0)
|
||||
if (row >= static_cast<int>(p->contexts_.size()) || row < 0)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ int TreeItem::column_count() const
|
|||
|
||||
QVariant TreeItem::data(int column) const
|
||||
{
|
||||
if (0 <= column && column < p->itemData_.size())
|
||||
if (0 <= column && column < static_cast<int>(p->itemData_.size()))
|
||||
{
|
||||
return p->itemData_[column];
|
||||
}
|
||||
|
|
@ -152,7 +152,7 @@ bool TreeItem::InsertChildren(int position, int count, int columns)
|
|||
|
||||
bool TreeItem::SetData(int column, const QVariant& value)
|
||||
{
|
||||
if (column < 0 || column >= p->itemData_.size())
|
||||
if (column < 0 || column >= static_cast<int>(p->itemData_.size()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ void SettingsInterface<T>::SetEditWidget(QWidget* widget)
|
|||
{
|
||||
// Error value
|
||||
value.push_back(
|
||||
std::numeric_limits<T::value_type>::min());
|
||||
std::numeric_limits<typename T::value_type>::min());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -235,6 +235,9 @@ void SettingsDialogImpl::ConnectSignals()
|
|||
case QDialogButtonBox::ButtonRole::ResetRole: // Restore Defaults
|
||||
ResetToDefault();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ void FontImpl::CreateImGuiFont(QFile& fontFile,
|
|||
strncpy(fontConfig.Name,
|
||||
fmt::format("{}:{}", fileInfo.fileName().toStdString(), fontSize)
|
||||
.c_str(),
|
||||
sizeof(fontConfig.Name));
|
||||
sizeof(fontConfig.Name) - 1);
|
||||
fontConfig.Name[sizeof(fontConfig.Name) - 1] = 0;
|
||||
|
||||
// Add font to atlas
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue