Gui: Use std::numeric_limits and std::numbers instead of defines

This commit is contained in:
Benjamin Nauck
2025-03-27 18:59:58 +01:00
parent ae686942a7
commit 34bc1d45ea
33 changed files with 204 additions and 168 deletions

View File

@@ -172,8 +172,9 @@ private:
struct Node_Slice
{
explicit Node_Slice(int min=1,int max=INT_MAX):Min(min),Max(max){}
int Min,Max;
explicit Node_Slice(int min = 1, int max = std::numeric_limits<int>::max())
: Min(min), Max(max) {}
int Min, Max;
};

View File

@@ -23,7 +23,6 @@
#ifndef GUI_SOFCSELECTIONCONTEXT_H
#define GUI_SOFCSELECTIONCONTEXT_H
#include <climits>
#include <map>
#include <memory>
#include <set>
@@ -79,11 +78,11 @@ struct GuiExport SoFCSelectionContext : SoFCSelectionContextBase
}
bool isHighlightAll() const{
return highlightIndex==INT_MAX && (selectionIndex.empty() || isSelectAll());
return highlightIndex == std::numeric_limits<int>::max() && (selectionIndex.empty() || isSelectAll());
}
void highlightAll() {
highlightIndex = INT_MAX;
highlightIndex = std::numeric_limits<int>::max();
}
void removeHighlight() {