mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 14:40:05 +00:00 
			
		
		
		
	General linter cleanup
This commit is contained in:
		
							parent
							
								
									e6cfef06a7
								
							
						
					
					
						commit
						8da440ea1f
					
				
					 3 changed files with 17 additions and 7 deletions
				
			
		|  | @ -12,14 +12,14 @@ | |||
| #   include <arpa/inet.h> | ||||
| #endif | ||||
| 
 | ||||
| namespace scwx | ||||
| { | ||||
| namespace awips | ||||
| namespace scwx::awips | ||||
| { | ||||
| 
 | ||||
| static const std::string logPrefix_ = "scwx::awips::wmo_header"; | ||||
| static const auto        logger_    = util::Logger::Create(logPrefix_); | ||||
| 
 | ||||
| static constexpr std::size_t kWmoHeaderMinLineLength_ = 18; | ||||
| 
 | ||||
| class WmoHeaderImpl | ||||
| { | ||||
| public: | ||||
|  | @ -37,6 +37,11 @@ public: | |||
|    } | ||||
|    ~WmoHeaderImpl() = default; | ||||
| 
 | ||||
|    WmoHeaderImpl(const WmoHeaderImpl&)             = delete; | ||||
|    WmoHeaderImpl& operator=(const WmoHeaderImpl&)  = delete; | ||||
|    WmoHeaderImpl(const WmoHeaderImpl&&)            = delete; | ||||
|    WmoHeaderImpl& operator=(const WmoHeaderImpl&&) = delete; | ||||
| 
 | ||||
|    bool operator==(const WmoHeaderImpl& o) const; | ||||
| 
 | ||||
|    std::string sequenceNumber_; | ||||
|  | @ -138,8 +143,9 @@ bool WmoHeader::Parse(std::istream& is) | |||
|    { | ||||
|       // The next line could be the WMO line or the sequence line
 | ||||
|       util::getline(is, wmoLine); | ||||
|       if (wmoLine.length() < 18) | ||||
|       if (wmoLine.length() < kWmoHeaderMinLineLength_) | ||||
|       { | ||||
|          // This is likely the sequence line instead
 | ||||
|          sequenceLine.swap(wmoLine); | ||||
|          util::getline(is, wmoLine); | ||||
|       } | ||||
|  | @ -249,5 +255,4 @@ bool WmoHeader::Parse(std::istream& is) | |||
|    return headerValid; | ||||
| } | ||||
| 
 | ||||
| } // namespace awips
 | ||||
| } // namespace scwx
 | ||||
| } // namespace scwx::awips
 | ||||
|  |  | |||
|  | @ -144,13 +144,16 @@ IemWarningsProvider::LoadTextProducts( | |||
| 
 | ||||
|    std::vector<std::pair<std::string_view, cpr::AsyncResponse>> | ||||
|       asyncResponses {}; | ||||
|    asyncResponses.reserve(textProducts.size()); | ||||
|     | ||||
|    const std::string endpointUrl = kBaseUrl_ + kNwsTextProductEndpoint_; | ||||
| 
 | ||||
|    for (auto& productId : textProducts) | ||||
|    { | ||||
|       asyncResponses.emplace_back( | ||||
|          productId, | ||||
|          cpr::GetAsync( | ||||
|             cpr::Url {kBaseUrl_ + kNwsTextProductEndpoint_ + productId}, | ||||
|             cpr::Url {endpointUrl + productId}, | ||||
|             network::cpr::GetHeader(), | ||||
|             parameters)); | ||||
|    } | ||||
|  |  | |||
|  | @ -107,6 +107,8 @@ void WriteJsonFile(const std::string&        path, | |||
|    } | ||||
| } | ||||
| 
 | ||||
| // Allow recursion within the pretty print function
 | ||||
| // NOLINTNEXTLINE(misc-no-recursion)
 | ||||
| static void PrettyPrintJson(std::ostream&             os, | ||||
|                             boost::json::value const& jv, | ||||
|                             std::string*              indent) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat