mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 08:30:04 +00:00 
			
		
		
		
	Fixing warnings in scwx-qt
This commit is contained in:
		
							parent
							
								
									3339a40780
								
							
						
					
					
						commit
						ff58f5bcf6
					
				
					 15 changed files with 36 additions and 21 deletions
				
			
		|  | @ -1,7 +1,9 @@ | |||
| #include <scwx/qt/gl/text_shader.hpp> | ||||
| #include <scwx/util/logger.hpp> | ||||
| 
 | ||||
| #pragma warning(push, 0) | ||||
| #include <glm/gtc/type_ptr.hpp> | ||||
| #pragma warning(pop) | ||||
| 
 | ||||
| namespace scwx | ||||
| { | ||||
|  |  | |||
|  | @ -154,7 +154,7 @@ MainWindow::MainWindow(QWidget* parent) : | |||
|    connect(qApp, | ||||
|            &QApplication::focusChanged, | ||||
|            this, | ||||
|            [=](QWidget* old, QWidget* now) { p->HandleFocusChange(now); }); | ||||
|            [=](QWidget* /*old*/, QWidget* now) { p->HandleFocusChange(now); }); | ||||
|    connect(p->level2ProductsWidget_, | ||||
|            &ui::Level2ProductsWidget::RadarProductSelected, | ||||
|            this, | ||||
|  | @ -277,7 +277,7 @@ void MainWindowImpl::ConfigureMapLayout() | |||
| 
 | ||||
|    maps_.resize(mapCount); | ||||
| 
 | ||||
|    auto MoveSplitter = [=](int pos, int index) | ||||
|    auto MoveSplitter = [=](int /*pos*/, int /*index*/) | ||||
|    { | ||||
|       QSplitter* s = dynamic_cast<QSplitter*>(sender()); | ||||
| 
 | ||||
|  |  | |||
|  | @ -2,8 +2,10 @@ | |||
| #include <scwx/qt/gl/shader_program.hpp> | ||||
| #include <scwx/util/logger.hpp> | ||||
| 
 | ||||
| #pragma warning(push, 0) | ||||
| #include <glm/glm.hpp> | ||||
| #include <glm/gtc/type_ptr.hpp> | ||||
| #pragma warning(pop) | ||||
| 
 | ||||
| namespace scwx | ||||
| { | ||||
|  |  | |||
|  | @ -2,9 +2,11 @@ | |||
| #include <scwx/qt/gl/shader_program.hpp> | ||||
| #include <scwx/util/logger.hpp> | ||||
| 
 | ||||
| #pragma warning(push, 0) | ||||
| #include <glm/glm.hpp> | ||||
| #include <glm/gtc/matrix_transform.hpp> | ||||
| #include <glm/gtc/type_ptr.hpp> | ||||
| #pragma warning(pop) | ||||
| 
 | ||||
| namespace scwx | ||||
| { | ||||
|  |  | |||
|  | @ -172,7 +172,7 @@ MapWidgetImpl::GetLevel2ProductOrDefault(const std::string& productName) const | |||
|    { | ||||
|       if (context_->radarProductView_ != nullptr) | ||||
|       { | ||||
|          common::Level2Product level2Product = common::GetLevel2Product( | ||||
|          level2Product = common::GetLevel2Product( | ||||
|             context_->radarProductView_->GetRadarProductName()); | ||||
|       } | ||||
|    } | ||||
|  |  | |||
|  | @ -9,6 +9,7 @@ | |||
| #include <chrono> | ||||
| #include <execution> | ||||
| 
 | ||||
| #pragma warning(push, 0) | ||||
| #include <boost/date_time.hpp> | ||||
| #include <boost/date_time/local_time/local_time.hpp> | ||||
| #include <boost/timer/timer.hpp> | ||||
|  | @ -17,6 +18,7 @@ | |||
| #include <glm/gtc/matrix_transform.hpp> | ||||
| #include <glm/gtc/type_ptr.hpp> | ||||
| #include <mbgl/util/constants.hpp> | ||||
| #pragma warning(pop) | ||||
| 
 | ||||
| namespace scwx | ||||
| { | ||||
|  |  | |||
|  | @ -4,12 +4,14 @@ | |||
| 
 | ||||
| #include <execution> | ||||
| 
 | ||||
| #pragma warning(push, 0) | ||||
| #include <boost/timer/timer.hpp> | ||||
| #include <GeographicLib/Geodesic.hpp> | ||||
| #include <glm/glm.hpp> | ||||
| #include <glm/gtc/matrix_transform.hpp> | ||||
| #include <glm/gtc/type_ptr.hpp> | ||||
| #include <mbgl/util/constants.hpp> | ||||
| #pragma warning(pop) | ||||
| 
 | ||||
| namespace scwx | ||||
| { | ||||
|  |  | |||
|  | @ -44,7 +44,7 @@ RadarProductRecord::RadarProductRecord( | |||
|    std::shared_ptr<wsr88d::Ar2vFile>   level2File = level2_file(); | ||||
|    std::shared_ptr<wsr88d::Level3File> level3File = level3_file(); | ||||
| 
 | ||||
|    uint16_t julianDate   = 0; | ||||
|    uint32_t julianDate   = 0; | ||||
|    uint32_t milliseconds = 0; | ||||
| 
 | ||||
|    if (level2File != nullptr) | ||||
|  |  | |||
|  | @ -34,8 +34,8 @@ public: | |||
|    { | ||||
|       layout_->setContentsMargins(0, 0, 0, 0); | ||||
| 
 | ||||
|       elevationGroupBox_       = new QGroupBox(tr("Elevation"), self); | ||||
|       QLayout* elevationLayout = new ui::FlowLayout(elevationGroupBox_); | ||||
|       elevationGroupBox_ = new QGroupBox(tr("Elevation"), self); | ||||
|       new ui::FlowLayout(elevationGroupBox_); | ||||
|       layout_->addWidget(elevationGroupBox_); | ||||
| 
 | ||||
|       settingsGroupBox_       = new QGroupBox(tr("Settings"), self); | ||||
|  |  | |||
|  | @ -16,6 +16,7 @@ | |||
| #include FT_SFNT_NAMES_H | ||||
| #include FT_TRUETYPE_IDS_H | ||||
| 
 | ||||
| #pragma warning(push, 0) | ||||
| // #include <freetype-gl.h> (exclude opengl.h)
 | ||||
| #include <platform.h> | ||||
| #include <vec234.h> | ||||
|  | @ -23,6 +24,7 @@ | |||
| #include <texture-atlas.h> | ||||
| #include <texture-font.h> | ||||
| #include <ftgl-utils.h> | ||||
| #pragma warning(pop) | ||||
| 
 | ||||
| #ifdef WIN32 | ||||
| #   include <WinSock2.h> | ||||
|  | @ -179,7 +181,7 @@ float Font::BufferText(std::shared_ptr<FontBuffer> buffer, | |||
|    return x; | ||||
| } | ||||
| 
 | ||||
| float Font::Kerning(char c1, char c2) const | ||||
| float Font::Kerning(char /*c1*/, char /*c2*/) const | ||||
| { | ||||
|    // TODO
 | ||||
|    return 0.0f; | ||||
|  |  | |||
|  | @ -225,27 +225,27 @@ void Level3ProductView::UpdateColorTable() | |||
|             uint16_t th = descriptionBlock->data_level_threshold(i); | ||||
|             if ((th & 0x8000u) == 0) | ||||
|             { | ||||
|                float scale = 1.0f; | ||||
|                float scaleFactor = 1.0f; | ||||
| 
 | ||||
|                if (th & 0x4000u) | ||||
|                { | ||||
|                   scale *= 0.01f; | ||||
|                   scaleFactor *= 0.01f; | ||||
|                } | ||||
|                if (th & 0x2000u) | ||||
|                { | ||||
|                   scale *= 0.05f; | ||||
|                   scaleFactor *= 0.05f; | ||||
|                } | ||||
|                if (th & 0x1000u) | ||||
|                { | ||||
|                   scale *= 0.1f; | ||||
|                   scaleFactor *= 0.1f; | ||||
|                } | ||||
|                if (th & 0x0100u) | ||||
|                { | ||||
|                   scale *= -1.0f; | ||||
|                   scaleFactor *= -1.0f; | ||||
|                } | ||||
| 
 | ||||
|                // If bit 0 is zero, then the LSB is numeric
 | ||||
|                f = static_cast<float>(th & 0x00ffu) * scale; | ||||
|                f = static_cast<float>(th & 0x00ffu) * scaleFactor; | ||||
| 
 | ||||
|                lut[lutIndex] = p->colorTable_->Color(f); | ||||
|             } | ||||
|  |  | |||
|  | @ -254,8 +254,6 @@ void Level3RadialView::ComputeSweep() | |||
|    dataMoments8.resize(radials * gates * VERTICES_PER_BIN); | ||||
| 
 | ||||
|    // Compute threshold at which to display an individual bin
 | ||||
|    const float    scale        = descriptionBlock->scale(); | ||||
|    const float    offset       = descriptionBlock->offset(); | ||||
|    const uint16_t snrThreshold = descriptionBlock->threshold(); | ||||
| 
 | ||||
|    // Determine which radial to start at
 | ||||
|  | @ -268,9 +266,7 @@ void Level3RadialView::ComputeSweep() | |||
|       const auto dataMomentsArray8 = radialData->level(radial); | ||||
| 
 | ||||
|       // Compute gate interval
 | ||||
|       const uint16_t dataMomentInterval  = descriptionBlock->x_resolution_raw(); | ||||
|       const uint16_t dataMomentIntervalH = dataMomentInterval / 2; | ||||
|       const uint16_t dataMomentRange     = dataMomentIntervalH; | ||||
|       const uint16_t dataMomentInterval = descriptionBlock->x_resolution_raw(); | ||||
| 
 | ||||
|       // Compute gate size (number of base gates per bin)
 | ||||
|       const uint16_t gateSize = std::max<uint16_t>( | ||||
|  |  | |||
|  | @ -278,8 +278,6 @@ void Level3RasterView::ComputeSweep() | |||
|    dataMoments8.resize(rows * maxColumns * VERTICES_PER_BIN); | ||||
| 
 | ||||
|    // Compute threshold at which to display an individual bin
 | ||||
|    const float    scale        = descriptionBlock->scale(); | ||||
|    const float    offset       = descriptionBlock->offset(); | ||||
|    const uint16_t snrThreshold = descriptionBlock->threshold(); | ||||
| 
 | ||||
|    for (size_t row = 0; row < rasterData->number_of_rows(); ++row) | ||||
|  |  | |||
|  | @ -79,7 +79,7 @@ void RadarProductView::Initialize() | |||
|    p->initialized_ = true; | ||||
| } | ||||
| 
 | ||||
| void RadarProductView::SelectElevation(float elevation) {} | ||||
| void RadarProductView::SelectElevation(float /*elevation*/) {} | ||||
| 
 | ||||
| bool RadarProductView::IsInitialized() const | ||||
| { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat