summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/HistoryStats/src/column_split.cpp2
-rw-r--r--plugins/HistoryStats/src/column_splittimeline.cpp2
-rw-r--r--plugins/HistoryStats/src/statistic.cpp9
3 files changed, 7 insertions, 6 deletions
diff --git a/plugins/HistoryStats/src/column_split.cpp b/plugins/HistoryStats/src/column_split.cpp
index 48d47b579f..7a21a97940 100644
--- a/plugins/HistoryStats/src/column_split.cpp
+++ b/plugins/HistoryStats/src/column_split.cpp
@@ -318,7 +318,7 @@ ColSplit::SplitParams ColSplit::getParams() const
}
break;
- case 2: // custom
+ default: // custom
{
params.alignment = m_nGraphAlign;
params.hours_in_block = unitFactors[m_nBlockUnit] * m_nUnitsPerBlock;
diff --git a/plugins/HistoryStats/src/column_splittimeline.cpp b/plugins/HistoryStats/src/column_splittimeline.cpp
index f28bc6cb6d..77e1211241 100644
--- a/plugins/HistoryStats/src/column_splittimeline.cpp
+++ b/plugins/HistoryStats/src/column_splittimeline.cpp
@@ -397,7 +397,7 @@ ColSplitTimeline::SplitParams ColSplitTimeline::getParams() const
}
break;
- case 2: // custom
+ default: // custom
{
params.alignment = m_nGraphAlign;
params.columns_to_group = m_nCustomGroup;
diff --git a/plugins/HistoryStats/src/statistic.cpp b/plugins/HistoryStats/src/statistic.cpp
index 3a202f3f09..61647087cd 100644
--- a/plugins/HistoryStats/src/statistic.cpp
+++ b/plugins/HistoryStats/src/statistic.cpp
@@ -1477,15 +1477,16 @@ void Statistic::run(const Settings& settings, InvocationSource invokedFrom, HINS
m_bRunning = true;
- // create object holding and performing the statistics
- Statistic* pStats = new Statistic(settings, invokedFrom, hInst);
-
+ HANDLE hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
// create event for thread stack unwinding
- if ((pStats->m_hThreadPushEvent = CreateEvent(NULL, FALSE, FALSE, NULL)) == NULL) {
+ if (hEvent == NULL) {
m_bRunning = false;
return;
}
+ // create object holding and performing the statistics
+ Statistic *pStats = new Statistic(settings, invokedFrom, hInst);
+ pStats->m_hThreadPushEvent = hEvent;
// create worker thread
DWORD dwThreadID = 0;
HANDLE hThread = CreateThread(NULL, 0, threadProc, pStats, 0, &dwThreadID);