mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-25 16:45:33 +00:00
replace __debugbreak with assert, fix full build
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "minecraft/util/WeighedRandom.h"
|
||||
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
|
||||
#include "app/linux/Stubs/winapi_stubs.h"
|
||||
#include "java/Random.h"
|
||||
@@ -17,7 +18,7 @@ int WeighedRandom::getTotalWeight(std::vector<WeighedRandomItem*>* items) {
|
||||
WeighedRandomItem* WeighedRandom::getRandomItem(
|
||||
Random* random, std::vector<WeighedRandomItem*>* items, int totalWeight) {
|
||||
if (totalWeight <= 0) {
|
||||
__debugbreak();
|
||||
assert(0);
|
||||
}
|
||||
|
||||
int selection = random->nextInt(totalWeight);
|
||||
@@ -49,7 +50,7 @@ WeighedRandomItem* WeighedRandom::getRandomItem(
|
||||
Random* random, const std::vector<WeighedRandomItem*>& items,
|
||||
int totalWeight) {
|
||||
if (totalWeight <= 0) {
|
||||
__debugbreak();
|
||||
assert(0);
|
||||
}
|
||||
|
||||
int selection = random->nextInt(totalWeight);
|
||||
|
||||
Reference in New Issue
Block a user