Replace tLimit() with qBound() and remove templates.h (#5040)
* Replace tLimit() with qBound() * Remove templates.h
This commit is contained in:
@@ -39,7 +39,6 @@
|
||||
#include <math.h>
|
||||
|
||||
#include "lmms_basics.h"
|
||||
#include "templates.h"
|
||||
#include "lmms_constants.h"
|
||||
#include "interpolation.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include "Engine.h"
|
||||
#include "Model.h"
|
||||
#include "JournallingObject.h"
|
||||
#include "templates.h"
|
||||
#include "ValueBuffer.h"
|
||||
|
||||
class ControllerDialog;
|
||||
@@ -112,7 +111,7 @@ public:
|
||||
|
||||
inline static float fittedValue( float _val )
|
||||
{
|
||||
return tLimit<float>( _val, 0.0f, 1.0f );
|
||||
return qBound<float>( 0.0f, _val, 1.0f );
|
||||
}
|
||||
|
||||
static long runningPeriods()
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#define DSP_EFFECT_LIBRARY_H
|
||||
|
||||
#include "lmms_math.h"
|
||||
#include "templates.h"
|
||||
#include "lmms_constants.h"
|
||||
#include "lmms_basics.h"
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include <QtCore/QPoint>
|
||||
|
||||
#include "AutomatableModelView.h"
|
||||
#include "templates.h"
|
||||
|
||||
|
||||
class QPixmap;
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
|
||||
#include "lmms_basics.h"
|
||||
#include "volume.h"
|
||||
#include "templates.h"
|
||||
#include "panning_constants.h"
|
||||
#include "Midi.h"
|
||||
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
* templates.h - miscellanous templates and algorithms
|
||||
*
|
||||
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of LMMS - https://lmms.io
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef TEMPLATES_H
|
||||
#define TEMPLATES_H
|
||||
|
||||
#include <QtCore/QtAlgorithms>
|
||||
|
||||
|
||||
template<class T>
|
||||
inline T tLimit( const T x, const T x1, const T x2 )
|
||||
{
|
||||
return qBound( x1, x, x2 );
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user