File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 33
44#include "Utilities.h"
55
6- namespace Settings
6+ struct Settings
77{
88 inline static const int SHUFFLE_MAX_VALUE = 8192 ;
99 inline static const int SHUFFLE_MAX_COUNT = 4096 ;
@@ -35,6 +35,6 @@ namespace Settings
3535
3636 inline static bool PLOT_DO_AFTERCHECK = true;
3737 inline static bool PLOT_SHUFFLE_ON_ALGO_CHANGE = false;
38-
38+
3939 inline static const int PAUSE_SLEEPms = 8 ;
40- }
40+ };
Original file line number Diff line number Diff line change @@ -66,6 +66,8 @@ void SortingAlgorithm::reset() {
6666SortingAlgorithm::stepState SortingAlgorithm::checkStep () {
6767 if (m_exit)
6868 return stepState::EXITED;
69+ else if (m_doStep)
70+ m_pause = true ;
6971 else if (m_pause) {
7072 sf::sleep (sf::milliseconds (Settings::PAUSE_SLEEPms));
7173 theClock.restart ();
@@ -78,7 +80,6 @@ SortingAlgorithm::stepState SortingAlgorithm::checkStep() {
7880 theClock.restart ();
7981
8082 if (m_doStep) {
81- m_pause = true ;
8283 m_doStep = false ;
8384 return stepState::STEP;
8485 }
You can’t perform that action at this time.
0 commit comments