Skip to content

Commit

Permalink
Remove deprecated std::random_shuffle call (Removed in c++17)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 25, 2021
1 parent bd82925 commit e15ec7d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/qgscolorramp.cpp
Expand Up @@ -483,7 +483,9 @@ void QgsRandomColorRamp::setTotalColorCount( const int colorCount )
}

//lastly, shuffle color list
std::random_shuffle( mPrecalculatedColors.begin(), mPrecalculatedColors.end() );
std::random_device rd;
std::mt19937 g( rd() );
std::shuffle( mPrecalculatedColors.begin(), mPrecalculatedColors.end(), g );
}

QString QgsRandomColorRamp::type() const
Expand Down

0 comments on commit e15ec7d

Please sign in to comment.