Gui: Use std::numeric_limits and std::numbers instead of defines
This commit is contained in:
@@ -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;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user