silence compiler warnings and apply small corrections
This commit is contained in:
@ -176,12 +176,12 @@ LammpsGui::LammpsGui(QWidget *parent, const QString &filename) :
|
||||
settings.setValue("intelprec", intelprec);
|
||||
|
||||
// Check and initialize nthreads setting for when OpenMP support is compiled in.
|
||||
// Default is to use OMP_NUM_THREADS setting, if that is not available, then
|
||||
// half of max (assuming hyperthreading is enabled) and no more than 16.
|
||||
// is no preference but do not override OMP_NUM_THREADS
|
||||
// Default is to use OMP_NUM_THREADS setting, if that is not available, thenhalf of max
|
||||
// (assuming hyper-threading is enabled) and no more than MAX_DEFAULT_THREADS (=16).
|
||||
// This is only if there is no preference set but do not override OMP_NUM_THREADS
|
||||
nthreads = 1;
|
||||
#if defined(_OPENMP)
|
||||
int default_threads = std::min(QThread::idealThreadCount() / 2, 16);
|
||||
int default_threads = std::min(QThread::idealThreadCount() / 2, MAX_DEFAULT_THREADS);
|
||||
default_threads = std::max(default_threads, 1);
|
||||
if (qEnvironmentVariableIsSet("OMP_NUM_THREADS"))
|
||||
default_threads = qEnvironmentVariable("OMP_NUM_THREADS").toInt();
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
* Modification refered from
|
||||
* https://gist.github.com/Riateche/27e36977f7d5ea72cf4f
|
||||
*/
|
||||
RangeSlider::RangeSlider(Qt::Orientation ot, QWidget *parent) : QSlider(ot)
|
||||
RangeSlider::RangeSlider(Qt::Orientation ot, QWidget *parent) : QSlider(ot, parent)
|
||||
{
|
||||
lowLimit = minimum();
|
||||
highLimit = maximum();
|
||||
@ -61,7 +61,7 @@ RangeSlider::RangeSlider(Qt::Orientation ot, QWidget *parent) : QSlider(ot)
|
||||
}
|
||||
|
||||
// based on http://qt.gitorious.org/qt/qt/blobs/master/src/gui/widgets/qslider.cpp
|
||||
void RangeSlider::paintEvent(QPaintEvent *ev)
|
||||
void RangeSlider::paintEvent(QPaintEvent *)
|
||||
{
|
||||
QPainter painter(this);
|
||||
QStyleOptionSlider opt;
|
||||
|
||||
Reference in New Issue
Block a user