1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -04:00

Freq scanner VAD: Sonar fixes

This commit is contained in:
f4exb
2026-02-22 10:44:39 +01:00
parent 7e5e9dabf6
commit e4022031a9
4 changed files with 37 additions and 46 deletions
+1
View File
@@ -20,6 +20,7 @@ These instructions guide Copilot to generate code that aligns with modern Qt C++
- Use **auto** for type deduction when it improves readability
- Utilize **smart pointers** (`std::unique_ptr`, `std::shared_ptr`) over raw pointers
- Apply **range-based for loops** instead of traditional iterator loops
- When the loop index is only used to access container elements, prefer **range-based loops** to avoid index/type mismatch and off-by-one errors (common Sonar findings)
- Use **constexpr** for compile-time constants and functions
- Leverage **structured bindings** for tuple/pair unpacking
- Use **std::optional** for optional values instead of null pointers