Remove unnecessary exports

If given type is not used across library interface it's methods can stay private.
As of now this is only test as I am not sure if it doesn't cause problems in wasm build.
This commit is contained in:
Michał Masiukiewicz 2022-10-27 22:33:23 +02:00
parent c0246ce2af
commit 0281fd5c1d
2 changed files with 59 additions and 59 deletions

View file

@ -72,31 +72,31 @@ nothrow:
size_t length; // Used to compute loadFactor
size_t markerdDeleted;
export void clear()
void clear()
{
elements.clear();
length = 0;
markerdDeleted = 0;
}
export void reset()
void reset()
{
elements.reset();
length = 0;
markerdDeleted = 0;
}
export bool isIn(ref Key el)
bool isIn(ref Key el)
{
return getIndex(el) != getIndexEmptyValue;
}
export bool isIn(Key el)
bool isIn(Key el)
{
return getIndex(el) != getIndexEmptyValue;
}
export Value* getPtr()(auto ref Key k)
Value* getPtr()(auto ref Key k)
{
size_t index = getIndex(k);
if (index == getIndexEmptyValue)
@ -109,20 +109,20 @@ nothrow:
}
}
export ref Value get()(auto ref Key k)
ref Value get()(auto ref Key k)
{
size_t index = getIndex(k);
assert(index != getIndexEmptyValue);
return elements[index].keyValue.value;
}
deprecated("Use get with second parameter.") export auto ref Value getDefault()(
deprecated("Use get with second parameter.") auto ref Value getDefault()(
auto ref Key k, auto ref Value defaultValue)
{
return get(k, defaultValue);
}
export auto ref Value get()(auto ref Key k, auto ref Value defaultValue)
auto ref Value get()(auto ref Key k, auto ref Value defaultValue)
{
size_t index = getIndex(k);
if (index == getIndexEmptyValue)
@ -135,7 +135,7 @@ nothrow:
}
}
export ref Value getInsertDefault()(auto ref Key k, auto ref Value defaultValue)
ref Value getInsertDefault()(auto ref Key k, auto ref Value defaultValue)
{
size_t index = getIndex(k);
if (index == getIndexEmptyValue)
@ -148,7 +148,7 @@ nothrow:
}
export bool tryRemove(Key el)
bool tryRemove(Key el)
{
size_t index = getIndex(el);
if (index == getIndexEmptyValue)
@ -161,23 +161,23 @@ nothrow:
return true;
}
export void remove(Key el)
void remove(Key el)
{
bool ok = tryRemove(el);
assert(ok);
}
export ref Value opIndex()(auto ref Key key)
ref Value opIndex()(auto ref Key key)
{
return get(key);
}
export void opIndexAssign()(auto ref Value value, auto ref Key key)
void opIndexAssign()(auto ref Value value, auto ref Key key)
{
add(key, value);
}
export void add()(auto ref Key key, auto ref Value value)
void add()(auto ref Key key, auto ref Value value)
{
size_t index = getIndex(key);
if (index != getIndexEmptyValue)
@ -221,12 +221,12 @@ nothrow:
//int numA;
//int numB;
export size_t getIndex(Key el)
size_t getIndex(Key el)
{
return getIndex(el);
}
export size_t getIndex(ref Key el)
size_t getIndex(ref Key el)
{
mixin(doNotInline);
@ -260,7 +260,7 @@ nothrow:
}
export float getLoadFactor(size_t forElementsNum)
float getLoadFactor(size_t forElementsNum)
{
if (elements.length == 0)
{
@ -269,7 +269,7 @@ nothrow:
return cast(float) forElementsNum / (elements.length);
}
export void rehash()()
void rehash()()
{
mixin(doNotInline);
// Get all elements
@ -303,7 +303,7 @@ nothrow:
}
// foreach support
export int opApply(DG)(scope DG dg)
int opApply(DG)(scope DG dg)
{
int result;
foreach (ref Bucket gr; elements)
@ -336,7 +336,7 @@ nothrow:
return result;
}
export int byKey(scope int delegate(ref Key k) dg)
int byKey(scope int delegate(ref Key k) dg)
{
int result;
foreach (ref Key k; this)
@ -348,7 +348,7 @@ nothrow:
return result;
}
export int byValue(scope int delegate(ref Value v) dg)
int byValue(scope int delegate(ref Value v) dg)
{
int result;
foreach (ref Value v; this)
@ -360,7 +360,7 @@ nothrow:
return result;
}
export int byKeyValue(scope int delegate(ref Key k, ref Value v) dg)
int byKeyValue(scope int delegate(ref Key k, ref Value v) dg)
{
int result;
foreach (ref Key k, ref Value v; this)