mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-27 18:41:05 +00:00
Fix C4459 msvc warning
declaration of 'navMeshVersion' hides global declaration
This commit is contained in:
parent
2d6e048d88
commit
8544aa481c
@ -150,7 +150,7 @@ namespace
|
||||
serialize(mSettings.mRecast, mAgentBounds, *recastMesh, objects));
|
||||
ASSERT_TRUE(tile.has_value());
|
||||
EXPECT_EQ(tile->mTileId, 1);
|
||||
EXPECT_EQ(tile->mVersion, navMeshVersion);
|
||||
EXPECT_EQ(tile->mVersion, navMeshFormatVersion);
|
||||
}
|
||||
|
||||
TEST_F(DetourNavigatorAsyncNavMeshUpdaterTest, post_when_writing_to_db_disabled_should_not_write_tiles)
|
||||
|
@ -92,7 +92,7 @@ namespace DetourNavigator
|
||||
{
|
||||
if (db == nullptr)
|
||||
return nullptr;
|
||||
return std::make_unique<DbWorker>(updater, std::move(db), TileVersion(navMeshVersion),
|
||||
return std::make_unique<DbWorker>(updater, std::move(db), TileVersion(navMeshFormatVersion),
|
||||
settings.mRecast, settings.mWriteToNavMeshDb);
|
||||
}
|
||||
|
||||
@ -483,7 +483,7 @@ namespace DetourNavigator
|
||||
std::unique_ptr<PreparedNavMeshData> preparedNavMeshData;
|
||||
bool generatedNavMeshData = false;
|
||||
|
||||
if (job.mCachedTileData.has_value() && job.mCachedTileData->mVersion == navMeshVersion)
|
||||
if (job.mCachedTileData.has_value() && job.mCachedTileData->mVersion == navMeshFormatVersion)
|
||||
{
|
||||
preparedNavMeshData = std::make_unique<PreparedNavMeshData>();
|
||||
if (deserialize(job.mCachedTileData->mData, *preparedNavMeshData))
|
||||
|
@ -73,7 +73,7 @@ namespace DetourNavigator
|
||||
std::vector<std::byte> input = serialize(mSettings.mRecast, mAgentBounds, *recastMesh, objects);
|
||||
const std::optional<NavMeshTileInfo> info = consumer->find(mWorldspace, mTilePosition, input);
|
||||
|
||||
if (info.has_value() && info->mVersion == navMeshVersion)
|
||||
if (info.has_value() && info->mVersion == navMeshFormatVersion)
|
||||
{
|
||||
consumer->identity(mWorldspace, mTilePosition, info->mTileId);
|
||||
ignore.mConsumer = nullptr;
|
||||
@ -86,9 +86,9 @@ namespace DetourNavigator
|
||||
return;
|
||||
|
||||
if (info.has_value())
|
||||
consumer->update(mWorldspace, mTilePosition, info->mTileId, navMeshVersion, *data);
|
||||
consumer->update(mWorldspace, mTilePosition, info->mTileId, navMeshFormatVersion, *data);
|
||||
else
|
||||
consumer->insert(mWorldspace, mTilePosition, navMeshVersion, input, *data);
|
||||
consumer->insert(mWorldspace, mTilePosition, navMeshFormatVersion, input, *data);
|
||||
|
||||
ignore.mConsumer = nullptr;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ namespace DetourNavigator
|
||||
std::uint64_t mMaxDbFileSize = 0;
|
||||
};
|
||||
|
||||
inline constexpr std::int64_t navMeshVersion = 2;
|
||||
inline constexpr std::int64_t navMeshFormatVersion = 2;
|
||||
|
||||
RecastSettings makeRecastSettingsFromSettingsManager();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user