Refactor mjXUtil::WriteAttr using templates.

PiperOrigin-RevId: 453848941
Change-Id: I1f87f0c20f0c89caab89ea4891aee7583a92534e
This commit is contained in:
Alessio Quaglino
2022-06-08 23:33:04 -07:00
committed by Copybara-Service
parent 066367fcc8
commit c7c765b6eb
4 changed files with 58 additions and 183 deletions
+3 -3
View File
@@ -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;
}