Trim trailing default values in saved xmls.
For attributes which accept variable-length inputs. Currently used for `gainprm, biasprm, friction, solref, solimp` Example: - Saved before: `biasprm="0 -3 -4 0 0 0 0 0 0 0"`. - Saved after: `biasprm="0 -3 -4"`. PiperOrigin-RevId: 607609550 Change-Id: I0501348280663867693175236872e2aabc703601
This commit is contained in:
committed by
Copybara-Service
parent
6a346c42e8
commit
f9f7827a64
+1
-1
@@ -195,7 +195,7 @@ class mjXUtil {
|
||||
// write attribute- any type
|
||||
template<typename T>
|
||||
static void WriteAttr(tinyxml2::XMLElement* elem, std::string name, int n, const T* data,
|
||||
const T* def = 0);
|
||||
const T* def = 0, bool trim = false);
|
||||
|
||||
// write vector<double> attribute, with and without default
|
||||
static void WriteVector(tinyxml2::XMLElement* elem, std::string name,
|
||||
|
||||
Reference in New Issue
Block a user