Skip to content

Commit 6c13637

Browse files
committed
feat: refactor recast build context bindings for naming clarity, remove unnecessary base RecastBuildContextImpl bindings
1 parent 7e91675 commit 6c13637

File tree

3 files changed

+8
-15
lines changed

3 files changed

+8
-15
lines changed

packages/recast-navigation-core/src/recast.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export class RecastBuildContext {
197197
accumulatedTimes: { [label: string]: number } = {};
198198

199199
constructor(timersAndLogsEnabled = true) {
200-
const impl = new Raw.Module.RecastBuildContextImpl();
200+
const impl = new Raw.Module.RecastBuildContextJsImpl();
201201

202202
impl.log = (category, msg, len) => {
203203
if (!this.raw.logEnabled()) return;

packages/recast-navigation-wasm/recast-navigation.idl

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -818,19 +818,12 @@ interface rcContext {
818818
float getAccumulatedTime([Const] rcTimerLabel label);
819819
};
820820

821-
interface RecastBuildContextJsImpl {
822-
void resetLog();
823-
void log([Const] rcLogCategory category, [Const] DOMString msg, [Const] long len);
824-
825-
void resetTimers();
826-
void startTimer([Const] rcTimerLabel label);
827-
void stopTimer([Const] rcTimerLabel label);
828-
long getAccumulatedTime([Const] rcTimerLabel label);
821+
interface RecastBuildContextImpl {
829822
};
830823

831-
[JSImplementation="RecastBuildContextJsImpl"]
832-
interface RecastBuildContextImpl {
833-
void RecastBuildContextImpl();
824+
[JSImplementation="RecastBuildContextImpl"]
825+
interface RecastBuildContextJsImpl {
826+
void RecastBuildContextJsImpl();
834827

835828
void resetLog();
836829
void log([Const] rcLogCategory category, [Const] DOMString msg, [Const] long len);

packages/recast-navigation-wasm/src/Recast.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ struct RecastCalcGridSizeResult
1515
int height;
1616
};
1717

18-
class RecastBuildContextJsImpl
18+
class RecastBuildContextImpl
1919
{
2020
public:
2121
virtual void resetLog() {}
@@ -34,9 +34,9 @@ class RecastBuildContextJsImpl
3434
class RecastBuildContext : public rcContext
3535
{
3636
public:
37-
RecastBuildContextJsImpl *impl;
37+
RecastBuildContextImpl *impl;
3838

39-
RecastBuildContext(RecastBuildContextJsImpl *recastBuildContextImpl)
39+
RecastBuildContext(RecastBuildContextImpl *recastBuildContextImpl)
4040
{
4141
impl = recastBuildContextImpl;
4242
}

0 commit comments

Comments
 (0)