mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-11-01 12:30:05 +00:00
Merge pull request #272 from AdenKoperczak/clang
Fixes for Clang and Added Clang Build
This commit is contained in:
commit
88246b26fe
49 changed files with 152 additions and 129 deletions
44
.github/workflows/ci.yml
vendored
44
.github/workflows/ci.yml
vendored
|
|
@ -37,10 +37,11 @@ jobs:
|
|||
conan_compiler: Visual Studio
|
||||
conan_compiler_version: 17
|
||||
conan_compiler_runtime: --settings compiler.runtime=MD
|
||||
conan_compiler_libcxx: ''
|
||||
conan_package_manager: ''
|
||||
artifact_suffix: windows-x64
|
||||
- name: linux64_gcc
|
||||
os: ubuntu-22.04
|
||||
os: ubuntu-24.04
|
||||
build_type: Release
|
||||
env_cc: gcc-11
|
||||
env_cxx: g++-11
|
||||
|
|
@ -53,9 +54,28 @@ jobs:
|
|||
conan_arch: x86_64
|
||||
conan_compiler: gcc
|
||||
conan_compiler_version: 11
|
||||
conan_compiler_libcxx: --settings compiler.libcxx=libstdc++
|
||||
conan_compiler_runtime: ''
|
||||
conan_package_manager: --conf tools.system.package_manager:mode=install --conf tools.system.package_manager:sudo=True
|
||||
artifact_suffix: linux-x64
|
||||
- name: linux64_clang
|
||||
os: ubuntu-24.04
|
||||
build_type: Release
|
||||
env_cc: clang-17
|
||||
env_cxx: clang++-17
|
||||
compiler: clang
|
||||
qt_version: 6.7.2
|
||||
qt_arch_aqt: linux_gcc_64
|
||||
qt_arch_dir: gcc_64
|
||||
qt_modules: qtimageformats qtmultimedia qtpositioning qtserialport
|
||||
qt_tools: ''
|
||||
conan_arch: x86_64
|
||||
conan_compiler: clang
|
||||
conan_compiler_version: 17
|
||||
conan_compiler_libcxx: --settings compiler.libcxx=libstdc++11
|
||||
conan_compiler_runtime: ''
|
||||
conan_package_manager: --conf tools.system.package_manager:mode=install --conf tools.system.package_manager:sudo=True
|
||||
artifact_suffix: linux-clang-x64
|
||||
name: ${{ matrix.name }}
|
||||
env:
|
||||
CC: ${{ matrix.env_cc }}
|
||||
|
|
@ -89,12 +109,15 @@ jobs:
|
|||
vsversion: ${{ matrix.msvc_version }}
|
||||
|
||||
- name: Setup Ubuntu Environment
|
||||
if: matrix.os == 'ubuntu-22.04'
|
||||
if: matrix.os == 'ubuntu-24.04'
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get install doxygen \
|
||||
libfuse2 \
|
||||
ninja-build
|
||||
ninja-build \
|
||||
clang-17 \
|
||||
gcc-11 \
|
||||
g++-11
|
||||
|
||||
- name: Setup Python Environment
|
||||
shell: pwsh
|
||||
|
|
@ -114,6 +137,7 @@ jobs:
|
|||
--settings build_type=${{ matrix.build_type }} `
|
||||
--settings compiler="${{ matrix.conan_compiler }}" `
|
||||
--settings compiler.version=${{ matrix.conan_compiler_version }} `
|
||||
${{ matrix.conan_compiler_libcxx }} `
|
||||
${{ matrix.conan_compiler_runtime }} `
|
||||
${{ matrix.conan_package_manager }}
|
||||
|
||||
|
|
@ -129,7 +153,7 @@ jobs:
|
|||
ninja supercell-wx wxtest
|
||||
|
||||
- name: Separate Debug Symbols (Linux)
|
||||
if: matrix.os == 'ubuntu-22.04'
|
||||
if: matrix.os == 'ubuntu-24.04'
|
||||
shell: bash
|
||||
run: |
|
||||
cd build/
|
||||
|
|
@ -148,7 +172,7 @@ jobs:
|
|||
cmake --install . --component supercell-wx
|
||||
|
||||
- name: Collect Artifacts
|
||||
if: matrix.os == 'ubuntu-22.04'
|
||||
if: matrix.os == 'ubuntu-24.04'
|
||||
shell: bash
|
||||
run: |
|
||||
pushd supercell-wx/
|
||||
|
|
@ -180,14 +204,14 @@ jobs:
|
|||
path: ${{ github.workspace }}/build/bin/*.pdb
|
||||
|
||||
- name: Upload Artifacts (Linux)
|
||||
if: matrix.os == 'ubuntu-22.04'
|
||||
if: matrix.os == 'ubuntu-24.04'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: supercell-wx-${{ matrix.artifact_suffix }}
|
||||
path: ${{ github.workspace }}/supercell-wx-${{ matrix.artifact_suffix }}.tar.gz
|
||||
|
||||
- name: Upload Debug Artifacts (Linux)
|
||||
if: matrix.os == 'ubuntu-22.04'
|
||||
if: matrix.os == 'ubuntu-24.04'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: supercell-wx-debug-${{ matrix.artifact_suffix }}
|
||||
|
|
@ -210,7 +234,7 @@ jobs:
|
|||
path: ${{ github.workspace }}/build/supercell-wx-*.msi*
|
||||
|
||||
- name: Build AppImage (Linux)
|
||||
if: matrix.os == 'ubuntu-22.04'
|
||||
if: matrix.os == 'ubuntu-24.04'
|
||||
env:
|
||||
APPIMAGE_DIR: ${{ github.workspace }}/supercell-wx/
|
||||
LDAI_UPDATE_INFORMATION: gh-releases-zsync|dpaulat|supercell-wx|latest|*x86_64.AppImage.zsync
|
||||
|
|
@ -234,10 +258,10 @@ jobs:
|
|||
rm -f linuxdeploy-x86_64.AppImage
|
||||
|
||||
- name: Upload AppImage (Linux)
|
||||
if: matrix.os == 'ubuntu-22.04'
|
||||
if: matrix.os == 'ubuntu-24.04'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: supercell-wx-appimage-x64
|
||||
name: supercell-wx-appimage-${{ matrix.artifact_suffix }}
|
||||
path: ${{ github.workspace }}/*-x86_64.AppImage*
|
||||
|
||||
- name: Test Supercell Wx
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include <boost/json.hpp>
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#if !(defined(_MSC_VER) || defined(__clang__))
|
||||
# include <date/date.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -271,7 +271,7 @@ size_t RadarSite::ReadConfig(const std::string& path)
|
|||
|
||||
try
|
||||
{
|
||||
#if defined(_MSC_VER)
|
||||
#if (defined(_MSC_VER) || defined(__clang__))
|
||||
using namespace std::chrono;
|
||||
#else
|
||||
using namespace date;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class DrawItem
|
|||
{
|
||||
public:
|
||||
explicit DrawItem(OpenGLFunctions& gl);
|
||||
~DrawItem();
|
||||
virtual ~DrawItem();
|
||||
|
||||
DrawItem(const DrawItem&) = delete;
|
||||
DrawItem& operator=(const DrawItem&) = delete;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ static const auto logger_ = scwx::util::Logger::Create(logPrefix_);
|
|||
static constexpr std::size_t kNumRectangles = 1;
|
||||
static constexpr std::size_t kNumTriangles = kNumRectangles * 2;
|
||||
static constexpr std::size_t kVerticesPerTriangle = 3;
|
||||
static constexpr std::size_t kVerticesPerRectangle = kVerticesPerTriangle * 2;
|
||||
static constexpr std::size_t kPointsPerVertex = 10;
|
||||
static constexpr std::size_t kPointsPerTexCoord = 3;
|
||||
static constexpr std::size_t kIconBufferLength =
|
||||
|
|
|
|||
|
|
@ -18,13 +18,9 @@ namespace draw
|
|||
static const std::string logPrefix_ = "scwx::qt::gl::draw::placefile_lines";
|
||||
static const auto logger_ = scwx::util::Logger::Create(logPrefix_);
|
||||
|
||||
static constexpr std::size_t kNumRectangles = 1;
|
||||
static constexpr std::size_t kNumTriangles = kNumRectangles * 2;
|
||||
static constexpr std::size_t kVerticesPerTriangle = 3;
|
||||
static constexpr std::size_t kVerticesPerRectangle = kVerticesPerTriangle * 2;
|
||||
static constexpr std::size_t kPointsPerVertex = 9;
|
||||
static constexpr std::size_t kBufferLength =
|
||||
kNumTriangles * kVerticesPerTriangle * kPointsPerVertex;
|
||||
|
||||
// Threshold, start time, end time
|
||||
static constexpr std::size_t kIntegersPerVertex_ = 3;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ static constexpr std::size_t kIntegersPerVertex_ = 3;
|
|||
|
||||
static constexpr std::size_t kTessVertexScreenX_ = 0;
|
||||
static constexpr std::size_t kTessVertexScreenY_ = 1;
|
||||
static constexpr std::size_t kTessVertexScreenZ_ = 2;
|
||||
static constexpr std::size_t kTessVertexXOffset_ = 3;
|
||||
static constexpr std::size_t kTessVertexYOffset_ = 4;
|
||||
static constexpr std::size_t kTessVertexR_ = 5;
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
#include <QTimer>
|
||||
#include <QToolButton>
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#if !(defined(_MSC_VER) || defined(__clang__))
|
||||
# include <date/date.h>
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@ const scwx::util::time_zone* RadarProductManager::default_time_zone() const
|
|||
}
|
||||
|
||||
case types::DefaultTimeZone::Local:
|
||||
#if defined(_MSC_VER)
|
||||
#if (defined(_MSC_VER) || defined(__clang__))
|
||||
return std::chrono::current_zone();
|
||||
#else
|
||||
return date::current_zone();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <scwx/awips/phenomenon.hpp>
|
||||
|
||||
#include <scwx/qt/map/draw_layer.hpp>
|
||||
#include <scwx/qt/types/text_event_key.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ static const std::vector<std::string> mapboxDrawBelow_ {
|
|||
static const std::unordered_map<MapProvider, MapProviderInfo> mapProviderInfo_ {
|
||||
{MapProvider::Mapbox,
|
||||
MapProviderInfo {
|
||||
.mapProvider_ {MapProvider::Mapbox},
|
||||
.mapProvider_ = MapProvider::Mapbox,
|
||||
.cacheDbName_ {"mbgl-cache.db"},
|
||||
.providerTemplate_ {
|
||||
QMapLibre::Settings::ProviderTemplate::MapboxProvider},
|
||||
.providerTemplate_ =
|
||||
QMapLibre::Settings::ProviderTemplate::MapboxProvider,
|
||||
.mapStyles_ {
|
||||
{.name_ {"Streets"},
|
||||
.url_ {"mapbox://styles/mapbox/streets-v11"},
|
||||
|
|
@ -117,10 +117,10 @@ static const std::unordered_map<MapProvider, MapProviderInfo> mapProviderInfo_ {
|
|||
.drawBelow_ {mapboxDrawBelow_}}}}},
|
||||
{MapProvider::MapTiler,
|
||||
MapProviderInfo {
|
||||
.mapProvider_ {MapProvider::MapTiler},
|
||||
.mapProvider_ = MapProvider::MapTiler,
|
||||
.cacheDbName_ {"maptiler-cache.db"},
|
||||
.providerTemplate_ {
|
||||
QMapLibre::Settings::ProviderTemplate::MapTilerProvider},
|
||||
.providerTemplate_ =
|
||||
QMapLibre::Settings::ProviderTemplate::MapTilerProvider,
|
||||
.mapStyles_ {
|
||||
{.name_ {"Satellite"},
|
||||
.url_ {"https://api.maptiler.com/maps/hybrid/style.json"},
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#include <QGuiApplication>
|
||||
#include <QMouseEvent>
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#if !(defined(_MSC_VER) || defined(__clang__))
|
||||
# include <date/date.h>
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -31,9 +31,6 @@ namespace qt
|
|||
namespace map
|
||||
{
|
||||
|
||||
static constexpr uint32_t MAX_RADIALS = 720;
|
||||
static constexpr uint32_t MAX_DATA_MOMENT_GATES = 1840;
|
||||
|
||||
static const std::string logPrefix_ = "scwx::qt::map::radar_product_layer";
|
||||
static const auto logger_ = scwx::util::Logger::Create(logPrefix_);
|
||||
|
||||
|
|
|
|||
|
|
@ -66,13 +66,6 @@ static const std::vector<types::LayerInfo> kImmovableLayers_ {
|
|||
{types::LayerType::Map, types::MapLayer::MapUnderlay, false},
|
||||
};
|
||||
|
||||
static const std::array<awips::Phenomenon, 5> kAlertPhenomena_ {
|
||||
awips::Phenomenon::Tornado,
|
||||
awips::Phenomenon::SnowSquall,
|
||||
awips::Phenomenon::SevereThunderstorm,
|
||||
awips::Phenomenon::FlashFlood,
|
||||
awips::Phenomenon::Marine};
|
||||
|
||||
class LayerModel::Impl
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@ static const std::string kRadarProductGroupName_ {"radar_product_group"};
|
|||
static const std::string kRadarProductName_ {"radar_product"};
|
||||
|
||||
static const std::string kDefaultMapStyle_ {"?"};
|
||||
static constexpr common::RadarProductGroup kDefaultRadarProductGroup_ =
|
||||
common::RadarProductGroup::Level3;
|
||||
static const std::string kDefaultRadarProductGroupString_ = "L3";
|
||||
static const std::array<std::string, kCount_> kDefaultRadarProduct_ {
|
||||
"N0B", "N0G", "N0C", "N0X"};
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class SettingsCategory
|
|||
{
|
||||
public:
|
||||
explicit SettingsCategory(const std::string& name);
|
||||
~SettingsCategory();
|
||||
virtual ~SettingsCategory();
|
||||
|
||||
SettingsCategory(const SettingsCategory&) = delete;
|
||||
SettingsCategory& operator=(const SettingsCategory&) = delete;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
#define SETTINGS_CONTAINER_IMPLEMENTATION
|
||||
|
||||
#include <scwx/qt/settings/settings_container.hpp>
|
||||
#include <scwx/util/logger.hpp>
|
||||
|
||||
|
|
@ -172,6 +170,8 @@ bool SettingsContainer<Container>::Equals(const SettingsVariableBase& o) const
|
|||
p->elementMaximum_ == v.p->elementMaximum_;
|
||||
}
|
||||
|
||||
template class SettingsContainer<std::vector<std::int64_t>>;
|
||||
|
||||
} // namespace settings
|
||||
} // namespace qt
|
||||
} // namespace scwx
|
||||
|
|
|
|||
|
|
@ -99,10 +99,6 @@ private:
|
|||
std::unique_ptr<Impl> p;
|
||||
};
|
||||
|
||||
#ifdef SETTINGS_CONTAINER_IMPLEMENTATION
|
||||
template class SettingsContainer<std::vector<std::int64_t>>;
|
||||
#endif
|
||||
|
||||
} // namespace settings
|
||||
} // namespace qt
|
||||
} // namespace scwx
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
#define SETTINGS_INTERFACE_IMPLEMENTATION
|
||||
|
||||
#include <scwx/qt/settings/settings_interface.hpp>
|
||||
#include <scwx/qt/settings/settings_variable.hpp>
|
||||
#include <scwx/qt/ui/hotkey_edit.hpp>
|
||||
|
|
@ -616,6 +614,14 @@ void SettingsInterface<T>::Impl::UpdateResetButton()
|
|||
}
|
||||
}
|
||||
|
||||
template class SettingsInterface<bool>;
|
||||
template class SettingsInterface<double>;
|
||||
template class SettingsInterface<std::int64_t>;
|
||||
template class SettingsInterface<std::string>;
|
||||
|
||||
// Containers are not to be used directly
|
||||
template class SettingsInterface<std::vector<std::int64_t>>;
|
||||
|
||||
} // namespace settings
|
||||
} // namespace qt
|
||||
} // namespace scwx
|
||||
|
|
|
|||
|
|
@ -131,16 +131,6 @@ private:
|
|||
std::unique_ptr<Impl> p;
|
||||
};
|
||||
|
||||
#ifdef SETTINGS_INTERFACE_IMPLEMENTATION
|
||||
template class SettingsInterface<bool>;
|
||||
template class SettingsInterface<double>;
|
||||
template class SettingsInterface<std::int64_t>;
|
||||
template class SettingsInterface<std::string>;
|
||||
|
||||
// Containers are not to be used directly
|
||||
template class SettingsInterface<std::vector<std::int64_t>>;
|
||||
#endif
|
||||
|
||||
} // namespace settings
|
||||
} // namespace qt
|
||||
} // namespace scwx
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
#define SETTINGS_VARIABLE_IMPLEMENTATION
|
||||
|
||||
#include <scwx/qt/settings/settings_variable.hpp>
|
||||
#include <scwx/util/logger.hpp>
|
||||
|
||||
|
|
@ -402,6 +400,14 @@ bool SettingsVariable<T>::Equals(const SettingsVariableBase& o) const
|
|||
p->maximum_ == v.p->maximum_;
|
||||
}
|
||||
|
||||
template class SettingsVariable<bool>;
|
||||
template class SettingsVariable<double>;
|
||||
template class SettingsVariable<std::int64_t>;
|
||||
template class SettingsVariable<std::string>;
|
||||
|
||||
// Containers are not to be used directly
|
||||
template class SettingsVariable<std::vector<std::int64_t>>;
|
||||
|
||||
} // namespace settings
|
||||
} // namespace qt
|
||||
} // namespace scwx
|
||||
|
|
|
|||
|
|
@ -239,16 +239,6 @@ private:
|
|||
std::unique_ptr<Impl> p;
|
||||
};
|
||||
|
||||
#ifdef SETTINGS_VARIABLE_IMPLEMENTATION
|
||||
template class SettingsVariable<bool>;
|
||||
template class SettingsVariable<double>;
|
||||
template class SettingsVariable<std::int64_t>;
|
||||
template class SettingsVariable<std::string>;
|
||||
|
||||
// Containers are not to be used directly
|
||||
template class SettingsVariable<std::vector<std::int64_t>>;
|
||||
#endif
|
||||
|
||||
} // namespace settings
|
||||
} // namespace qt
|
||||
} // namespace scwx
|
||||
|
|
|
|||
|
|
@ -420,7 +420,7 @@ void Level3ProductsWidgetImpl::UpdateCategorySelection(
|
|||
|
||||
std::for_each(categoryButtons_.cbegin(),
|
||||
categoryButtons_.cend(),
|
||||
[&, this](auto& toolButton)
|
||||
[&](auto& toolButton)
|
||||
{
|
||||
if (toolButton->text().toStdString() == categoryName)
|
||||
{
|
||||
|
|
@ -444,7 +444,7 @@ void Level3ProductsWidgetImpl::UpdateProductSelection(
|
|||
|
||||
std::for_each(awipsProductMap_.cbegin(),
|
||||
awipsProductMap_.cend(),
|
||||
[&, this](const auto& pair)
|
||||
[&](const auto& pair)
|
||||
{
|
||||
if (pair.second == awipsId)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ public:
|
|||
void SetupTextTab();
|
||||
void SetupHotkeysTab();
|
||||
|
||||
void ShowColorDialog(QLineEdit* lineEdit, QFrame* frame = nullptr);
|
||||
void ShowColorDialog(QLineEdit* lineEdit);
|
||||
void UpdateRadarDialogLocation(const std::string& id);
|
||||
void UpdateAlertRadarDialogLocation(const std::string& id);
|
||||
|
||||
|
|
@ -784,7 +784,7 @@ void SettingsDialogImpl::SetupPalettesColorTablesTab()
|
|||
QObject::connect(dialog,
|
||||
&QFileDialog::fileSelected,
|
||||
self_,
|
||||
[this, lineEdit](const QString& file)
|
||||
[lineEdit](const QString& file)
|
||||
{
|
||||
QString path = QDir::toNativeSeparators(file);
|
||||
|
||||
|
|
@ -913,12 +913,12 @@ void SettingsDialogImpl::SetupPalettesAlertsTab()
|
|||
&QAbstractButton::clicked,
|
||||
self_,
|
||||
[=, this]()
|
||||
{ ShowColorDialog(activeEdit, activeFrame); });
|
||||
{ ShowColorDialog(activeEdit); });
|
||||
QObject::connect(inactiveButton,
|
||||
&QAbstractButton::clicked,
|
||||
self_,
|
||||
[=, this]()
|
||||
{ ShowColorDialog(inactiveEdit, inactiveFrame); });
|
||||
{ ShowColorDialog(inactiveEdit); });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1384,7 +1384,7 @@ void SettingsDialogImpl::LoadColorTablePreview(const std::string& key,
|
|||
});
|
||||
}
|
||||
|
||||
void SettingsDialogImpl::ShowColorDialog(QLineEdit* lineEdit, QFrame* frame)
|
||||
void SettingsDialogImpl::ShowColorDialog(QLineEdit* lineEdit)
|
||||
{
|
||||
QColorDialog* dialog = new QColorDialog(self_);
|
||||
|
||||
|
|
@ -1401,7 +1401,7 @@ void SettingsDialogImpl::ShowColorDialog(QLineEdit* lineEdit, QFrame* frame)
|
|||
dialog,
|
||||
&QColorDialog::colorSelected,
|
||||
self_,
|
||||
[this, lineEdit, frame](const QColor& color)
|
||||
[lineEdit](const QColor& color)
|
||||
{
|
||||
QString colorName = color.name(QColor::NameFormat::HexArgb);
|
||||
|
||||
|
|
|
|||
|
|
@ -224,6 +224,9 @@ QFileBuffer::pos_type QFileBuffer::seekoff(off_type off,
|
|||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
logger_->error("Got invalid seekdir value");
|
||||
break;
|
||||
}
|
||||
|
||||
if (newPos != static_cast<off_type>(-1))
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@ std::chrono::sys_days SysDays(const QDate& date)
|
|||
using namespace std::chrono;
|
||||
using sys_days = time_point<system_clock, days>;
|
||||
constexpr auto julianEpoch = sys_days {-4713y / November / 24d};
|
||||
constexpr auto unixEpoch = sys_days {1970y / January / 1d};
|
||||
constexpr auto offset = std::chrono::days(julianEpoch - unixEpoch);
|
||||
|
||||
return std::chrono::sys_days(std::chrono::days(date.toJulianDay()) +
|
||||
julianEpoch);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#include <boost/timer/timer.hpp>
|
||||
#include <fmt/format.h>
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#if !(defined(_MSC_VER) || defined(__clang__))
|
||||
# include <date/date.h>
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include <scwx/common/products.hpp>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <algorithm>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,8 +7,17 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
#endif
|
||||
|
||||
#include <boost/range/any_range.hpp>
|
||||
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace awips
|
||||
|
|
|
|||
|
|
@ -8,8 +8,17 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
#endif
|
||||
|
||||
#include <boost/range/any_range.hpp>
|
||||
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace awips
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ public:
|
|||
std::chrono::system_clock::time_point
|
||||
segment_event_begin(std::size_t s) const;
|
||||
|
||||
std::size_t data_size() const;
|
||||
std::size_t data_size() const override;
|
||||
|
||||
bool Parse(std::istream& is) override;
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace scwx
|
|||
namespace util
|
||||
{
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#if (defined(_MSC_VER) || defined(__clang__))
|
||||
typedef std::chrono::time_zone time_zone;
|
||||
#else
|
||||
typedef date::time_zone time_zone;
|
||||
|
|
|
|||
|
|
@ -29,16 +29,16 @@ public:
|
|||
operator=(DigitalRadialDataArrayPacket&&) noexcept;
|
||||
|
||||
uint16_t packet_code() const override;
|
||||
uint16_t index_of_first_range_bin() const;
|
||||
uint16_t number_of_range_bins() const;
|
||||
int16_t i_center_of_sweep() const;
|
||||
int16_t j_center_of_sweep() const;
|
||||
uint16_t index_of_first_range_bin() const override;
|
||||
uint16_t number_of_range_bins() const override;
|
||||
int16_t i_center_of_sweep() const override;
|
||||
int16_t j_center_of_sweep() const override;
|
||||
float range_scale_factor() const;
|
||||
uint16_t number_of_radials() const;
|
||||
uint16_t number_of_radials() const override;
|
||||
|
||||
float start_angle(uint16_t r) const;
|
||||
float delta_angle(uint16_t r) const;
|
||||
const std::vector<uint8_t>& level(uint16_t r) const;
|
||||
float start_angle(uint16_t r) const override;
|
||||
float delta_angle(uint16_t r) const override;
|
||||
const std::vector<uint8_t>& level(uint16_t r) const override;
|
||||
|
||||
size_t data_size() const override;
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public:
|
|||
|
||||
const std::vector<std::vector<std::shared_ptr<Packet>>>& page_list() const;
|
||||
|
||||
bool Parse(std::istream& is);
|
||||
bool Parse(std::istream& is) override;
|
||||
|
||||
static constexpr size_t SIZE = 102u;
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public:
|
|||
GraphicProductMessage(GraphicProductMessage&&) noexcept;
|
||||
GraphicProductMessage& operator=(GraphicProductMessage&&) noexcept;
|
||||
|
||||
std::shared_ptr<ProductDescriptionBlock> description_block() const;
|
||||
std::shared_ptr<ProductDescriptionBlock> description_block() const override;
|
||||
std::shared_ptr<ProductSymbologyBlock> symbology_block() const;
|
||||
std::shared_ptr<GraphicAlphanumericBlock> graphic_block() const;
|
||||
std::shared_ptr<TabularAlphanumericBlock> tabular_block() const;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public:
|
|||
|
||||
size_t data_size() const override;
|
||||
|
||||
bool Parse(std::istream& is);
|
||||
bool Parse(std::istream& is) override;
|
||||
|
||||
static constexpr size_t SIZE = 102u;
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public:
|
|||
RadarCodedMessage(RadarCodedMessage&&) noexcept;
|
||||
RadarCodedMessage& operator=(RadarCodedMessage&&) noexcept;
|
||||
|
||||
std::shared_ptr<ProductDescriptionBlock> description_block() const;
|
||||
std::shared_ptr<ProductDescriptionBlock> description_block() const override;
|
||||
|
||||
bool Parse(std::istream& is) override;
|
||||
|
||||
|
|
|
|||
|
|
@ -27,16 +27,16 @@ public:
|
|||
RadialDataPacket& operator=(RadialDataPacket&&) noexcept;
|
||||
|
||||
uint16_t packet_code() const override;
|
||||
uint16_t index_of_first_range_bin() const;
|
||||
uint16_t number_of_range_bins() const;
|
||||
int16_t i_center_of_sweep() const;
|
||||
int16_t j_center_of_sweep() const;
|
||||
uint16_t index_of_first_range_bin() const override;
|
||||
uint16_t number_of_range_bins() const override;
|
||||
int16_t i_center_of_sweep() const override;
|
||||
int16_t j_center_of_sweep() const override;
|
||||
float scale_factor() const;
|
||||
uint16_t number_of_radials() const;
|
||||
uint16_t number_of_radials() const override;
|
||||
|
||||
float start_angle(uint16_t r) const;
|
||||
float delta_angle(uint16_t r) const;
|
||||
const std::vector<uint8_t>& level(uint16_t r) const;
|
||||
float start_angle(uint16_t r) const override;
|
||||
float delta_angle(uint16_t r) const override;
|
||||
const std::vector<uint8_t>& level(uint16_t r) const override;
|
||||
|
||||
size_t data_size() const override;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public:
|
|||
|
||||
const std::vector<std::vector<std::string>>& page_list() const;
|
||||
|
||||
bool Parse(std::istream& is);
|
||||
bool Parse(std::istream& is) override;
|
||||
bool Parse(std::istream& is, bool skipHeader);
|
||||
|
||||
static constexpr size_t SIZE = 102u;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public:
|
|||
TabularProductMessage(TabularProductMessage&&) noexcept;
|
||||
TabularProductMessage& operator=(TabularProductMessage&&) noexcept;
|
||||
|
||||
std::shared_ptr<ProductDescriptionBlock> description_block() const;
|
||||
std::shared_ptr<ProductDescriptionBlock> description_block() const override;
|
||||
std::shared_ptr<TabularAlphanumericBlock> tabular_block() const;
|
||||
|
||||
bool Parse(std::istream& is) override;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
#include <sstream>
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#if !(defined(_MSC_VER) || defined(__clang__))
|
||||
# include <date/date.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ bool CodedTimeMotionLocation::Parse(const StringRange& lines,
|
|||
{
|
||||
using namespace std::chrono;
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#if !(defined(_MSC_VER) || defined(__clang__))
|
||||
using namespace date;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#include <boost/bimap.hpp>
|
||||
#include <boost/bimap/unordered_set_of.hpp>
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#if !(defined(_MSC_VER) || defined(__clang__))
|
||||
# include <date/date.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ bool PVtec::Parse(const std::string& s)
|
|||
{
|
||||
using namespace std::chrono;
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#if !(defined(_MSC_VER) || defined(__clang__))
|
||||
using namespace date;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,18 @@
|
|||
#include <sstream>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
#endif
|
||||
|
||||
#include <boost/gil.hpp>
|
||||
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#include <hsluv.h>
|
||||
|
||||
namespace scwx
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#if !(defined(_MSC_VER) || defined(__clang__))
|
||||
# include <date/date.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -284,7 +284,7 @@ void Placefile::Impl::ProcessLine(const std::string& line)
|
|||
{
|
||||
using namespace std::chrono;
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#if !(defined(_MSC_VER) || defined(__clang__))
|
||||
using namespace date;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include <cpr/cpr.h>
|
||||
#include <libxml/HTMLparser.h>
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#if !(defined(_MSC_VER) || defined(__clang__))
|
||||
# include <date/date.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -200,7 +200,7 @@ void DirListSAXHandler::Characters(void* userData, const xmlChar* ch, int len)
|
|||
{
|
||||
using namespace std::chrono;
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#if !(defined(_MSC_VER) || defined(__clang__))
|
||||
using namespace date;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include <fmt/chrono.h>
|
||||
#include <fmt/format.h>
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#if !(defined(_MSC_VER) || defined(__clang__))
|
||||
# include <date/date.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ AwsLevel2DataProvider::GetTimePointFromKey(const std::string& key)
|
|||
{
|
||||
using namespace std::chrono;
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#if !(defined(_MSC_VER) || defined(__clang__))
|
||||
using namespace date;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
#include <fmt/chrono.h>
|
||||
#include <fmt/format.h>
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#if !(defined(_MSC_VER) || defined(__clang__))
|
||||
# include <date/date.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -110,7 +110,7 @@ AwsLevel3DataProvider::GetTimePointFromKey(const std::string& key)
|
|||
{
|
||||
using namespace std::chrono;
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#if !(defined(_MSC_VER) || defined(__clang__))
|
||||
using namespace date;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
#include <libxml/HTMLparser.h>
|
||||
#include <re2/re2.h>
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#if !(defined(_MSC_VER) || defined(__clang__))
|
||||
# include <date/date.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -30,8 +30,6 @@ namespace provider
|
|||
static const std::string logPrefix_ = "scwx::provider::warnings_provider";
|
||||
static const auto logger_ = util::Logger::Create(logPrefix_);
|
||||
|
||||
static constexpr std::chrono::seconds kUpdatePeriod_ {15};
|
||||
|
||||
class WarningsProvider::Impl
|
||||
{
|
||||
public:
|
||||
|
|
@ -73,7 +71,7 @@ WarningsProvider::ListFiles(std::chrono::system_clock::time_point newerThan)
|
|||
{
|
||||
using namespace std::chrono;
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#if !(defined(_MSC_VER) || defined(__clang__))
|
||||
using namespace date;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#if !(defined(_MSC_VER) || defined(__clang__))
|
||||
# include <date/date.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ std::string TimeString(std::chrono::system_clock::time_point time,
|
|||
{
|
||||
using namespace std::chrono;
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#if (defined(_MSC_VER) || defined(__clang__))
|
||||
# define FORMAT_STRING_24_HOUR "{:%Y-%m-%d %H:%M:%S %Z}"
|
||||
# define FORMAT_STRING_12_HOUR "{:%Y-%m-%d %I:%M:%S %p %Z}"
|
||||
namespace date = std::chrono;
|
||||
|
|
@ -128,7 +128,7 @@ TryParseDateTime(const std::string& dateTimeFormat, const std::string& str)
|
|||
{
|
||||
using namespace std::chrono;
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#if !(defined(_MSC_VER) || defined(__clang__))
|
||||
using namespace date;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -721,15 +721,15 @@ bool DigitalRadarDataGeneric::Parse(std::istream& is)
|
|||
{
|
||||
case DataBlockType::Volume:
|
||||
p->volumeDataBlock_ =
|
||||
std::move(VolumeDataBlock::Create(dataBlockType, dataName, is));
|
||||
VolumeDataBlock::Create(dataBlockType, dataName, is);
|
||||
break;
|
||||
case DataBlockType::Elevation:
|
||||
p->elevationDataBlock_ =
|
||||
std::move(ElevationDataBlock::Create(dataBlockType, dataName, is));
|
||||
ElevationDataBlock::Create(dataBlockType, dataName, is);
|
||||
break;
|
||||
case DataBlockType::Radial:
|
||||
p->radialDataBlock_ =
|
||||
std::move(RadialDataBlock::Create(dataBlockType, dataName, is));
|
||||
RadialDataBlock::Create(dataBlockType, dataName, is);
|
||||
break;
|
||||
case DataBlockType::MomentRef:
|
||||
case DataBlockType::MomentVel:
|
||||
|
|
@ -739,7 +739,7 @@ bool DigitalRadarDataGeneric::Parse(std::istream& is)
|
|||
case DataBlockType::MomentRho:
|
||||
case DataBlockType::MomentCfp:
|
||||
p->momentDataBlock_[dataBlock] =
|
||||
std::move(MomentDataBlock::Create(dataBlockType, dataName, is));
|
||||
MomentDataBlock::Create(dataBlockType, dataName, is);
|
||||
break;
|
||||
default:
|
||||
logger_->warn("Unknown data name: {}", dataName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue