mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 20:50:06 +00:00
More clang-tidy fixes
This commit is contained in:
parent
86926178df
commit
dc074b0262
2 changed files with 17 additions and 10 deletions
|
|
@ -462,7 +462,7 @@ void AlertLayerHandler::HandleAlertsRemoved(
|
||||||
for (const auto& segmentRecord : segmentsIt->second)
|
for (const auto& segmentRecord : segmentsIt->second)
|
||||||
{
|
{
|
||||||
auto& segment = segmentRecord->segment_;
|
auto& segment = segmentRecord->segment_;
|
||||||
bool alertActive = IsAlertActive(segment);
|
const bool alertActive = IsAlertActive(segment);
|
||||||
|
|
||||||
// Remove from segmentsByType_
|
// Remove from segmentsByType_
|
||||||
auto typeIt = segmentsByType_.find({key.phenomenon_, alertActive});
|
auto typeIt = segmentsByType_.find({key.phenomenon_, alertActive});
|
||||||
|
|
@ -624,9 +624,9 @@ void AlertLayer::Impl::AddAlert(
|
||||||
// If draw items were added
|
// If draw items were added
|
||||||
if (drawItems.second)
|
if (drawItems.second)
|
||||||
{
|
{
|
||||||
const float borderWidth = static_cast<float>(lineData.borderWidth_);
|
const auto borderWidth = static_cast<float>(lineData.borderWidth_);
|
||||||
const float highlightWidth = static_cast<float>(lineData.highlightWidth_);
|
const auto highlightWidth = static_cast<float>(lineData.highlightWidth_);
|
||||||
const float lineWidth = static_cast<float>(lineData.lineWidth_);
|
const auto lineWidth = static_cast<float>(lineData.lineWidth_);
|
||||||
|
|
||||||
const float totalHighlightWidth = lineWidth + (highlightWidth * 2.0f);
|
const float totalHighlightWidth = lineWidth + (highlightWidth * 2.0f);
|
||||||
const float totalBorderWidth = totalHighlightWidth + (borderWidth * 2.0f);
|
const float totalBorderWidth = totalHighlightWidth + (borderWidth * 2.0f);
|
||||||
|
|
@ -812,9 +812,9 @@ void AlertLayer::Impl::UpdateLines()
|
||||||
auto& lineData = GetLineData(segment, alertActive);
|
auto& lineData = GetLineData(segment, alertActive);
|
||||||
auto& geoLines = geoLines_.at(alertActive);
|
auto& geoLines = geoLines_.at(alertActive);
|
||||||
|
|
||||||
const float borderWidth = static_cast<float>(lineData.borderWidth_);
|
const auto borderWidth = static_cast<float>(lineData.borderWidth_);
|
||||||
const float highlightWidth = static_cast<float>(lineData.highlightWidth_);
|
const auto highlightWidth = static_cast<float>(lineData.highlightWidth_);
|
||||||
const float lineWidth = static_cast<float>(lineData.lineWidth_);
|
const auto lineWidth = static_cast<float>(lineData.lineWidth_);
|
||||||
|
|
||||||
const float totalHighlightWidth = lineWidth + (highlightWidth * 2.0f);
|
const float totalHighlightWidth = lineWidth + (highlightWidth * 2.0f);
|
||||||
const float totalBorderWidth = totalHighlightWidth + (borderWidth * 2.0f);
|
const float totalBorderWidth = totalHighlightWidth + (borderWidth * 2.0f);
|
||||||
|
|
|
||||||
|
|
@ -88,8 +88,15 @@ AlertProxyModel::Impl::Impl(AlertProxyModel* self) :
|
||||||
|
|
||||||
AlertProxyModel::Impl::~Impl()
|
AlertProxyModel::Impl::~Impl()
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
std::unique_lock lock(alertMutex_);
|
std::unique_lock lock(alertMutex_);
|
||||||
alertUpdateTimer_.cancel();
|
alertUpdateTimer_.cancel();
|
||||||
|
}
|
||||||
|
catch (const std::exception& ex)
|
||||||
|
{
|
||||||
|
logger_->error(ex.what());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AlertProxyModel::Impl::UpdateAlerts()
|
void AlertProxyModel::Impl::UpdateAlerts()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue