diff options
author | Daniel Wilhelm <daniel@wili.li> | 2015-10-02 14:56:07 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2015-10-02 14:56:07 +0200 |
commit | de73d25e0b27f4bee2de116d19cab32800785d64 (patch) | |
tree | 21de1736d12a92223ad04c02a5b0826d77e5e71c /wx+ | |
parent | 7.1 (diff) | |
download | FreeFileSync-de73d25e0b27f4bee2de116d19cab32800785d64.tar.gz FreeFileSync-de73d25e0b27f4bee2de116d19cab32800785d64.tar.bz2 FreeFileSync-de73d25e0b27f4bee2de116d19cab32800785d64.zip |
7.2
Diffstat (limited to 'wx+')
-rw-r--r-- | wx+/file_drop.h | 2 | ||||
-rw-r--r-- | wx+/graph.cpp | 16 | ||||
-rw-r--r-- | wx+/image_resources.cpp | 3 |
3 files changed, 12 insertions, 9 deletions
diff --git a/wx+/file_drop.h b/wx+/file_drop.h index 0e9e92ad..2feef6e2 100644 --- a/wx+/file_drop.h +++ b/wx+/file_drop.h @@ -16,7 +16,7 @@ #include <wx/dnd.h> #ifdef ZEN_WIN_VISTA_AND_LATER -#include <zen/win.h> + #include <zen/win.h> #endif diff --git a/wx+/graph.cpp b/wx+/graph.cpp index 3ab045b7..d76e4d41 100644 --- a/wx+/graph.cpp +++ b/wx+/graph.cpp @@ -120,7 +120,7 @@ int widenRange(double& valMin, double& valMax, //in/out const double minValRangePerBlock = (valMax - valMin) / graphAreaSize; const double proposedValRangePerBlock = (valMax - valMin) * optimalBlockSizePx / graphAreaSize; double valRangePerBlock = labelFmt.getOptimalBlockSize(proposedValRangePerBlock); - assert(numeric::isNull(proposedValRangePerBlock) || valRangePerBlock > minValRangePerBlock); + assert(numeric::isNull(proposedValRangePerBlock) || valRangePerBlock > minValRangePerBlock); if (numeric::isNull(valRangePerBlock)) //valMin == valMax or strange "optimal block size" return 1; @@ -131,15 +131,15 @@ int widenRange(double& valMin, double& valMax, //in/out double blockMin = std::floor(valMin / valRangePerBlock); //store as double, not int: truncation possible, e.g. if valRangePerBlock == 1 double blockMax = std::ceil (valMax / valRangePerBlock); // - int blockCount = numeric::round(blockMax - blockMin); - assert(blockCount >= 0); + int blockCount = numeric::round(blockMax - blockMin); + assert(blockCount >= 0); - //handle valMin == valMax == integer + //handle valMin == valMax == integer if (blockCount <= 0) - { - ++blockMax; - blockCount = 1; - } + { + ++blockMax; + blockCount = 1; + } valMin = blockMin * valRangePerBlock; valMax = blockMax * valRangePerBlock; diff --git a/wx+/image_resources.cpp b/wx+/image_resources.cpp index 3a7ba3ee..9d4f2396 100644 --- a/wx+/image_resources.cpp +++ b/wx+/image_resources.cpp @@ -42,6 +42,9 @@ class GlobalResources public: static GlobalResources& instance() { +#if defined _MSC_VER && _MSC_VER > 1800 +#error remove warning +#endif //caveat: function scope static initialization is not thread-safe in VS 2010! => but we wouldn't use wxWidgets in combination with multithreading anyway! static GlobalResources inst; return inst; |