<commit_before>#include "MeshPool.h"

using namespace Rendering;
using namespace Rendering::Geometry;
using namespace Rendering::Buffer;

Mesh& VBSortedMeshPool::Add(Mesh& mesh)
{
	const auto& vbKey = mesh.GetVBKey();
	assert(_bookmark.Has(mesh.GetObjectID().Literal()) == false);

	_bookmark.Add(mesh.GetObjectID().Literal(), vbKey);

	if (HasVBKey(vbKey) == false)
	{
		MeshRawPool first;
		first.Add(mesh);

		return _pool.Add(vbKey, first).Get(0);
	}

//	else
	auto rawPool = _pool.Find(vbKey);
	assert(rawPool->Has(mesh.GetObjectID().Literal()) == false);
	return rawPool->Add(mesh);
}

void VBSortedMeshPool::Delete(Core::ObjectID::LiteralType id)
{
	uint vbKey = _bookmark.Find(id);
	assert(vbKey != decltype(_bookmark)::Fail());

	auto rawPool = _pool.Find(vbKey);
	rawPool->Delete(id);
	_bookmark.Delete(id);

	if (rawPool->Empty())
		_pool.Delete(vbKey);
}

bool VBSortedMeshPool::Has(Core::ObjectID::LiteralType id) const
{
	uint vbKey = _bookmark.Find(id);
	return (vbKey != decltype(_bookmark)::Fail()) ? 
		_pool.Find(vbKey)->Has(id) : false;
}

Mesh* VBSortedMeshPool::Find(Core::ObjectID::LiteralType id)
{
	uint vbKey = _bookmark.Find(id);
	return (vbKey != decltype(_bookmark)::Fail()) ?
		_pool.Find(vbKey)->Find(id) : nullptr;<commit_msg>MeshPool - 코드 정리<commit_after>#include "MeshPool.h"

using namespace Rendering;
using namespace Rendering::Geometry;
using namespace Rendering::Buffer;

Mesh& VBSortedMeshPool::Add(Mesh& mesh)
{
	uint literalID = mesh.GetObjectID().Literal();
	const auto& vbKey = mesh.GetVBKey();
	assert(_bookmark.Has(literalID) == false);

	_bookmark.Add(literalID, vbKey);

	if (HasVBKey(vbKey) == false)
	{
		MeshRawPool first;
		first.Add(mesh);

		return _pool.Add(vbKey, first).Get(0);
	}

//	else
	auto rawPool = _pool.Find(vbKey);
	assert(rawPool->Has(literalID) == false);
	return rawPool->Add(mesh);
}

void VBSortedMeshPool::Delete(Core::ObjectID::LiteralType id)
{
	uint vbKey = _bookmark.Find(id);
	assert(vbKey != decltype(_bookmark)::Fail());

	auto rawPool = _pool.Find(vbKey);
	rawPool->Delete(id);
	_bookmark.Delete(id);

	if (rawPool->Empty())
		_pool.Delete(vbKey);
}

bool VBSortedMeshPool::Has(Core::ObjectID::LiteralType id) const
{
	uint vbKey = _bookmark.Find(id);
	return (vbKey != decltype(_bookmark)::Fail()) ? 
		_pool.Find(vbKey)->Has(id) : false;
}

Mesh* VBSortedMeshPool::Find(Core::ObjectID::LiteralType id)
{
	uint vbKey = _bookmark.Find(id);
	return (vbKey != decltype(_bookmark)::Fail()) ?
		_pool.Find(vbKey)->Find(id) : nullptr;
{'fraction_non_alphanumeric': 0.17250996015936254, 'fraction_numerical': 0.0007968127490039841, 'mean_word_length': 6.0139664804469275, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '667239', 'n_tokens_mistral': 974, 'n_tokens_neox': 944, 'n_words': 160}