diff options
author | Sara Golemon <sara.golemon@mongodb.com> | 2019-03-01 17:03:55 +0000 |
---|---|---|
committer | Sara Golemon <sara.golemon@mongodb.com> | 2019-03-02 22:30:30 +0000 |
commit | 857d20826c15d6a8fccf0b2b364bf7c4791220a1 (patch) | |
tree | fadf76fb3637b14c211f36e3d9d2dcd814f8c9de /buildscripts | |
parent | 5a2c07a84088b215af9f1b1b160103cd8ecd76b3 (diff) | |
download | mongo-857d20826c15d6a8fccf0b2b364bf7c4791220a1.tar.gz |
SERVER-39907 Migrate enable test commands to IDL
Diffstat (limited to 'buildscripts')
-rw-r--r-- | buildscripts/idl/idl/generator.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/buildscripts/idl/idl/generator.py b/buildscripts/idl/idl/generator.py index 6de4738500a..a9afd96af6a 100644 --- a/buildscripts/idl/idl/generator.py +++ b/buildscripts/idl/idl/generator.py @@ -1954,7 +1954,8 @@ class _CppSourceFileWriter(_CppFileWriterBase): if param.redact: self._writer.write_line('ret->setRedact();') - if param.default is not None: + if param.default and not (param.cpp_vartype and param.cpp_varname): + # Only need to call setValue() if we haven't in-place initialized the declared var. self._writer.write_line('uassertStatusOK(ret->setValue(%s));' % (_get_expression(param.default))) |