diff options
| author | Chris Forbes <chrisforbes@google.com> | 2017-05-02 18:36:39 -0700 |
|---|---|---|
| committer | Chris Forbes <chrisf@ijw.co.nz> | 2017-05-03 11:38:06 -0700 |
| commit | 1cb5c5175ce195b420841b86f162f024251454b7 (patch) | |
| tree | f8a6948ec775896bf30ac99e2c282d760dc1d8d0 /scripts/unique_objects_generator.py | |
| parent | 33dd5555aa33fb81f731468314e9f40d662b145f (diff) | |
| download | usermoji-1cb5c5175ce195b420841b86f162f024251454b7.tar.xz | |
layers: Don't generate T* = reinterpret_cast(T*) new T()
No need for the cast, these types already line up.
Diffstat (limited to 'scripts/unique_objects_generator.py')
| -rw-r--r-- | scripts/unique_objects_generator.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/unique_objects_generator.py b/scripts/unique_objects_generator.py index e48c0ad2..baf30c19 100644 --- a/scripts/unique_objects_generator.py +++ b/scripts/unique_objects_generator.py @@ -496,7 +496,7 @@ class UniqueObjectsOutputGenerator(OutputGenerator): if struct_info[0].feature_protect is not None: pnext_proc += '#ifdef %s \n' % struct_info[0].feature_protect pnext_proc += ' case %s: {\n' % self.structTypes[item].value - pnext_proc += ' safe_%s *safe_struct = reinterpret_cast<safe_%s *>(new safe_%s);\n' % (item, item, item) + pnext_proc += ' safe_%s *safe_struct = new safe_%s;\n' % (item, item) pnext_proc += ' safe_struct->initialize(reinterpret_cast<const %s *>(cur_pnext));\n' % item # Generate code to unwrap the handles indent = ' ' |
