Skip to content

Commit

Permalink
Replace calls to mj_makeEmptyFileVFS with mj_addBufferVFS in robotics…
Browse files Browse the repository at this point in the history
… code.

PiperOrigin-RevId: 644696787
Change-Id: I5506d277a36892b8a2b40a574f8832bbe305794d
  • Loading branch information
Default authored and copybara-github committed Jun 19, 2024
1 parent 16f6575 commit 62b3ddc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 2 additions & 5 deletions cpp/mujoco/include/dm_robotics/mujoco/mjlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#ifndef DM_ROBOTICS_MUJOCO_MJLIB_H_
#define DM_ROBOTICS_MUJOCO_MJLIB_H_

#include <memory>
#include <string>

#include <mujoco/mujoco.h> //NOLINT
Expand All @@ -25,9 +24,8 @@ namespace dm_robotics {
extern "C" {

using MjDefaultVFSFunc = decltype(mj_defaultVFS);
using MjAddBufferVFSFunc = decltype(mj_addBufferVFS);
using MjAddFileVFSFunc = decltype(mj_addFileVFS);
using MjMakeEmptyFileVFSFunc = decltype(mj_makeEmptyFileVFS);
using MjFindFileVFSFunc = decltype(mj_findFileVFS);
using MjDeleteFileVFSFunc = decltype(mj_deleteFileVFS);
using MjDeleteVFSFunc = decltype(mj_deleteVFS);
using MjLoadXmlFunc = decltype(mj_loadXML);
Expand Down Expand Up @@ -309,9 +307,8 @@ class MjLib {
~MjLib();

MjDefaultVFSFunc* const mj_defaultVFS; // NOLINT
MjAddBufferVFSFunc* const mj_addBufferVFS; // NOLINT
MjAddFileVFSFunc* const mj_addFileVFS; // NOLINT
MjMakeEmptyFileVFSFunc* const mj_makeEmptyFileVFS; // NOLINT
MjFindFileVFSFunc* const mj_findFileVFS; // NOLINT
MjDeleteFileVFSFunc* const mj_deleteFileVFS; // NOLINT
MjDeleteVFSFunc* const mj_deleteVFS; // NOLINT
MjSaveLastXMLFunc* const mj_saveLastXML; // NOLINT
Expand Down
3 changes: 1 addition & 2 deletions cpp/mujoco/src/mjlib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ namespace dm_robotics {

MjLib::MjLib(const std::string& libmujoco_path, int dlopen_flags)
: MJLIB_INIT(mj_defaultVFS),
MJLIB_INIT(mj_addBufferVFS),
MJLIB_INIT(mj_addFileVFS),
MJLIB_INIT(mj_makeEmptyFileVFS),
MJLIB_INIT(mj_findFileVFS),
MJLIB_INIT(mj_deleteFileVFS),
MJLIB_INIT(mj_deleteVFS),
MJLIB_INIT(mj_saveLastXML),
Expand Down

0 comments on commit 62b3ddc

Please sign in to comment.