Skip to content

Commit

Permalink
Add source code links in docs for remaining API functions.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 692728907
Change-Id: I145eb47453e6aa017505d53d3e17215959252e3d
  • Loading branch information
kbayes authored and copybara-github committed Nov 3, 2024
1 parent efa5709 commit c168ac3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions doc/js/linenumbers.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,26 @@ class LineNumbers {
this.map.set(key, `https://github.com/google-deepmind/mujoco/blob/main/src/${src}#L${i+1}`);
}
}

// edge cases
if (src == 'user/user_api.cc') {
for (let i = 0; i < lines.length; i++) {
if (lines[i].startsWith('[[nodiscard]] int mj_recompile(')) {
const key = 'mj_recompile';
this.map.set(key, `https://github.com/google-deepmind/mujoco/blob/main/src/${src}#L${i+1}`);
}
}
} else if (src == 'engine/engine_io.c') {
for (let i = 0; i < lines.length; i++) {
if (lines[i].startsWith('void mj_freeStack(')) {
const key = 'mj_freeStack';
this.map.set(key, `https://github.com/google-deepmind/mujoco/blob/main/src/${src}#L${i+1}`);
} else if (lines[i].startsWith('void mj_markStack(')) {
const key = 'mj_markStack';
this.map.set(key, `https://github.com/google-deepmind/mujoco/blob/main/src/${src}#L${i+1}`);
}
}
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/render/render_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -1864,7 +1864,7 @@ void mjr_freeContext(mjrContext* con) {


// resize offscreen buffers
MJAPI void mjr_resizeOffscreen(int width, int height, mjrContext* con) {
void mjr_resizeOffscreen(int width, int height, mjrContext* con) {
if (con->offWidth == width && con->offHeight == height) {
return;
}
Expand Down

0 comments on commit c168ac3

Please sign in to comment.