mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-30 17:50:29 +01:00
refactor: change typedef, nullptr, scoped_lock and others
This commit is contained in:
@@ -352,7 +352,7 @@ bool TAnimModel::Load(cParser *parser, bool ter)
|
||||
|
||||
if( i < iNumLights
|
||||
&& token != "-1" ) { // -1 leaves the default color intact
|
||||
auto const lightcolor { std::stoi( token, 0, 16 ) };
|
||||
auto const lightcolor { std::stoi( token, nullptr, 16 ) };
|
||||
m_lightcolors[i] = {
|
||||
( lightcolor >> 16 & 0xff ) / 255.f,
|
||||
( lightcolor >> 8 & 0xff ) / 255.f,
|
||||
@@ -655,7 +655,7 @@ int TAnimModel::TerrainCount()
|
||||
|
||||
TSubModel * TAnimModel::TerrainSquare(int n)
|
||||
{ // pobieranie wskaźników do pierwszego submodelu
|
||||
return pModel ? pModel->TerrainSquare(n) : 0;
|
||||
return pModel ? pModel->TerrainSquare(n) : nullptr;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
@@ -26,8 +26,8 @@ public:
|
||||
|
||||
private:
|
||||
// types:
|
||||
typedef std::deque<TMdlContainer> modelcontainer_sequence;
|
||||
typedef std::unordered_map<std::string, modelcontainer_sequence::size_type> stringmodelcontainerindex_map;
|
||||
using modelcontainer_sequence = std::deque<TMdlContainer>;
|
||||
using stringmodelcontainerindex_map = std::unordered_map<std::string, modelcontainer_sequence::size_type>;
|
||||
// members:
|
||||
static modelcontainer_sequence m_models;
|
||||
static stringmodelcontainerindex_map m_modelsmap;
|
||||
|
||||
@@ -165,13 +165,13 @@ public:
|
||||
|
||||
private:
|
||||
// types:
|
||||
typedef std::pair<
|
||||
using texturetimepoint_pair = std::pair<
|
||||
opengl_texture *,
|
||||
resource_timestamp > texturetimepoint_pair;
|
||||
resource_timestamp >;
|
||||
|
||||
typedef std::vector< texturetimepoint_pair > texturetimepointpair_sequence;
|
||||
using texturetimepointpair_sequence = std::vector< texturetimepoint_pair >;
|
||||
|
||||
typedef std::unordered_map<std::string, std::size_t> index_map;
|
||||
using index_map = std::unordered_map<std::string, std::size_t>;
|
||||
|
||||
// methods:
|
||||
// checks whether specified texture is in the texture bank. returns texture id, or npos.
|
||||
|
||||
@@ -152,8 +152,8 @@ public:
|
||||
|
||||
private:
|
||||
// types
|
||||
typedef std::vector<opengl_material> material_sequence;
|
||||
typedef std::unordered_map<std::string, std::size_t> index_map;
|
||||
using material_sequence = std::vector<opengl_material>;
|
||||
using index_map = std::unordered_map<std::string, std::size_t>;
|
||||
// methods:
|
||||
// checks whether specified texture is in the texture bank. returns texture id, or npos.
|
||||
material_handle
|
||||
|
||||
Reference in New Issue
Block a user