Refactor mjXUtil::WriteAttr using templates.
PiperOrigin-RevId: 453848941 Change-Id: I1f87f0c20f0c89caab89ea4891aee7583a92534e
This commit is contained in:
committed by
Copybara-Service
parent
066367fcc8
commit
c7c765b6eb
@@ -17,14 +17,14 @@
|
||||
namespace mujoco {
|
||||
|
||||
namespace {
|
||||
thread_local const char* precision = "%g";
|
||||
thread_local int precision = 6;
|
||||
}
|
||||
|
||||
const char* _mjPRIVATE__get_xml_precision() {
|
||||
int _mjPRIVATE__get_xml_precision() {
|
||||
return precision;
|
||||
}
|
||||
|
||||
void _mjPRIVATE__set_xml_precision(const char* new_precision) {
|
||||
void _mjPRIVATE__set_xml_precision(const int new_precision) {
|
||||
precision = new_precision;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user