mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 14:31:50 +00:00
<algorithm> included where needed
This commit is contained in:
parent
de3e3e0fe4
commit
02860f193a
2 changed files with 5 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
#include "panels.h"
|
#include "panels.h"
|
||||||
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include "../../window/Window.h"
|
#include "../../window/Window.h"
|
||||||
#include "../../assets/Assets.h"
|
#include "../../assets/Assets.h"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
#include "Inventories.h"
|
#include "Inventories.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include "../world/Level.h"
|
#include "../world/Level.h"
|
||||||
#include "../world/World.h"
|
#include "../world/World.h"
|
||||||
|
|
||||||
|
|
@ -18,7 +21,7 @@ std::shared_ptr<Inventory> Inventories::create(size_t size) {
|
||||||
std::shared_ptr<Inventory> Inventories::createVirtual(size_t size) {
|
std::shared_ptr<Inventory> Inventories::createVirtual(size_t size) {
|
||||||
int64_t id;
|
int64_t id;
|
||||||
do {
|
do {
|
||||||
id = -std::max(1L, std::abs(random.rand64()));
|
id = -std::max(1LL, std::abs(random.rand64()));
|
||||||
} while (map.find(id) != map.end());
|
} while (map.find(id) != map.end());
|
||||||
|
|
||||||
auto inv = std::make_shared<Inventory>(id, size);
|
auto inv = std::make_shared<Inventory>(id, size);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue