mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 17:09:19 +02:00
reformat: set variables to constexpr where possible
This commit is contained in:
@@ -20,8 +20,8 @@ http://mozilla.org/MPL/2.0/.
|
||||
#include "vehicle/DynObj.h"
|
||||
#include "scene/scenenode.h"
|
||||
|
||||
const int iMaxNumLights = 8;
|
||||
float const DefaultDarkThresholdLevel { 0.325f };
|
||||
constexpr int iMaxNumLights = 8;
|
||||
constexpr float DefaultDarkThresholdLevel { 0.325f };
|
||||
|
||||
// typy stanu świateł
|
||||
enum TLightState
|
||||
|
||||
@@ -18,10 +18,10 @@ http://mozilla.org/MPL/2.0/.
|
||||
#define EU07_USE_GEOMETRYINDEXING
|
||||
|
||||
// Ra: specjalne typy submodeli, poza tym GL_TRIANGLES itp.
|
||||
const int TP_ROTATOR = 256;
|
||||
const int TP_FREESPOTLIGHT = 257;
|
||||
const int TP_STARS = 258;
|
||||
const int TP_TEXT = 259;
|
||||
constexpr int TP_ROTATOR = 256;
|
||||
constexpr int TP_FREESPOTLIGHT = 257;
|
||||
constexpr int TP_STARS = 258;
|
||||
constexpr int TP_TEXT = 259;
|
||||
|
||||
enum class TAnimType // rodzaj animacji
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
std::min(
|
||||
m_resourcesweepindex + m_unusedresourcesweepsize,
|
||||
m_container.size() );
|
||||
auto const blanktimestamp { std::chrono::steady_clock::time_point() };
|
||||
constexpr auto blanktimestamp { std::chrono::steady_clock::time_point() };
|
||||
int releasecount{ 0 };
|
||||
for( auto resourceindex = m_resourcesweepindex; resourceindex < sweeplastindex; ++resourceindex ) {
|
||||
if( m_container[resourceindex].second != blanktimestamp
|
||||
|
||||
@@ -963,7 +963,7 @@ opengl_texture::create( bool const Static ) {
|
||||
glTexParameteri(target, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_REF_TO_TEXTURE);
|
||||
wrap_mode_s = GL_CLAMP_TO_BORDER;
|
||||
wrap_mode_t = GL_CLAMP_TO_BORDER;
|
||||
const float borderColor[] = { 0.0f, 0.0f, 0.0f, 0.0f };
|
||||
constexpr float borderColor[] = { 0.0f, 0.0f, 0.0f, 0.0f };
|
||||
glTexParameterfv(target, GL_TEXTURE_BORDER_COLOR, borderColor);
|
||||
}
|
||||
glTexParameteri( target, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
|
||||
|
||||
Reference in New Issue
Block a user