Skip to content

Commit

Permalink
Add missing include, No null from create_sample
Browse files Browse the repository at this point in the history
  • Loading branch information
iguessthislldo committed Jun 4, 2024
1 parent 763b3e8 commit 3be1005
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions dds/DCPS/TypeSupportImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#define OPENDDS_DCPS_TYPESUPPORTIMPL_H

#include "dcps_export.h"
#include "debug.h"
#include "Definitions.h"
#include "LocalObject.h"
#include "Serializer.h"
Expand Down
14 changes: 7 additions & 7 deletions dds/idl/ts_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,18 +333,18 @@ bool ts_generator::generate_ts(AST_Type* node, UTL_ScopedName* name)
if (op_ret_is_ptr) {
be_global->impl_ <<
" " << short_cxx_name << "* value = new " << short_cxx_name << ";\n"
" if (" << ts_base << "::create_sample_rc(src, *value) == ::DDS::RETCODE_OK) {\n"
" return value;\n"
" }\n"
" delete value;\n"
" return 0;\n";
" const ::DDS::ReturnCode_t rc = " << ts_base << "::create_sample_rc(src, *value);\n";
} else {
be_global->impl_ <<
" " << short_cxx_name << " value;\n"
" " << ts_base << "::create_sample_rc(src, value);\n"
" return value;\n";
" const ::DDS::ReturnCode_t rc = " << ts_base << "::create_sample_rc(src, value);\n";
}
be_global->impl_ <<
" if (rc != DDS::RETCODE_OK && OpenDDS::DCPS::log_level >= OpenDDS::DCPS::LogLevel::Warning) {\n"
" ACE_ERROR((LM_WARNING, \"(%P|%t) WARNING: " << short_tsi_name << "::create_sample: \"\n"
" \"create_sample_rc failed: %C\\n\", OpenDDS::DCPS::retcode_to_string(rc)));\n"
" }\n"
" return value;\n"
"}\n"
"#endif\n"
"\n"
Expand Down

0 comments on commit 3be1005

Please sign in to comment.