Skip to content

Commit d2760d7

Browse files
[SkyMarshal] Explicitly static_cast hashes to int64
Topic: lcm-hash-cast Reviewers: hayk,bradley,abe,peter Relative: eigenlcm-fix GitOrigin-RevId: 47e296c7c7eff2540a57cef2d2cf5ca9bbd02ab6
1 parent de296a8 commit d2760d7

File tree

13 files changed

+13
-13
lines changed

13 files changed

+13
-13
lines changed

test/symforce_function_codegen_test_data/symengine/codegen_cpp_test_data/cpp/lcmtypes/codegen_cpp_test/constants_t.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ int constants_t::getEncodedSize() const
144144

145145
constexpr int64_t constants_t::getHash()
146146
{
147-
return _computeHash(NULL);
147+
return static_cast<int64_t>(_computeHash(NULL));
148148
}
149149

150150
constexpr constants_t::type_name_array_t* constants_t::getTypeNameArrayPtr() {

test/symforce_function_codegen_test_data/symengine/codegen_explicit_template_instantiation_test_data/cpp/lcmtypes/codegen_explicit_template_instantiation_test/constants_t.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ int constants_t::getEncodedSize() const
144144

145145
constexpr int64_t constants_t::getHash()
146146
{
147-
return _computeHash(NULL);
147+
return static_cast<int64_t>(_computeHash(NULL));
148148
}
149149

150150
constexpr constants_t::type_name_array_t* constants_t::getTypeNameArrayPtr() {

test/symforce_function_codegen_test_data/symengine/codegen_multi_function_test_data/cpp/lcmtypes/codegen_multi_function_test/inputs_constants_t.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ int inputs_constants_t::getEncodedSize() const
144144

145145
constexpr int64_t inputs_constants_t::getHash()
146146
{
147-
return _computeHash(NULL);
147+
return static_cast<int64_t>(_computeHash(NULL));
148148
}
149149

150150
constexpr inputs_constants_t::type_name_array_t* inputs_constants_t::getTypeNameArrayPtr() {

test/symforce_function_codegen_test_data/symengine/codegen_multi_function_test_data/cpp/lcmtypes/codegen_multi_function_test/outputs_2_t.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ int outputs_2_t::getEncodedSize() const
144144

145145
constexpr int64_t outputs_2_t::getHash()
146146
{
147-
return _computeHash(NULL);
147+
return static_cast<int64_t>(_computeHash(NULL));
148148
}
149149

150150
constexpr outputs_2_t::type_name_array_t* outputs_2_t::getTypeNameArrayPtr() {

test/symforce_function_codegen_test_data/symengine/codegen_python_test_data/cpp/lcmtypes/codegen_python_test/constants_t.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ int constants_t::getEncodedSize() const
144144

145145
constexpr int64_t constants_t::getHash()
146146
{
147-
return _computeHash(NULL);
147+
return static_cast<int64_t>(_computeHash(NULL));
148148
}
149149

150150
constexpr constants_t::type_name_array_t* constants_t::getTypeNameArrayPtr() {

test/symforce_function_codegen_test_data/symengine/with_jacobians_values/cpp/lcmtypes/sym/d_out_t.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ int d_out_t::getEncodedSize() const
150150

151151
constexpr int64_t d_out_t::getHash()
152152
{
153-
return _computeHash(NULL);
153+
return static_cast<int64_t>(_computeHash(NULL));
154154
}
155155

156156
constexpr d_out_t::type_name_array_t* d_out_t::getTypeNameArrayPtr() {

test/symforce_function_codegen_test_data/sympy/codegen_cpp_test_data/cpp/lcmtypes/codegen_cpp_test/constants_t.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ int constants_t::getEncodedSize() const
144144

145145
constexpr int64_t constants_t::getHash()
146146
{
147-
return _computeHash(NULL);
147+
return static_cast<int64_t>(_computeHash(NULL));
148148
}
149149

150150
constexpr constants_t::type_name_array_t* constants_t::getTypeNameArrayPtr() {

test/symforce_function_codegen_test_data/sympy/codegen_explicit_template_instantiation_test_data/cpp/lcmtypes/codegen_explicit_template_instantiation_test/constants_t.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ int constants_t::getEncodedSize() const
144144

145145
constexpr int64_t constants_t::getHash()
146146
{
147-
return _computeHash(NULL);
147+
return static_cast<int64_t>(_computeHash(NULL));
148148
}
149149

150150
constexpr constants_t::type_name_array_t* constants_t::getTypeNameArrayPtr() {

test/symforce_function_codegen_test_data/sympy/codegen_multi_function_test_data/cpp/lcmtypes/codegen_multi_function_test/inputs_constants_t.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ int inputs_constants_t::getEncodedSize() const
144144

145145
constexpr int64_t inputs_constants_t::getHash()
146146
{
147-
return _computeHash(NULL);
147+
return static_cast<int64_t>(_computeHash(NULL));
148148
}
149149

150150
constexpr inputs_constants_t::type_name_array_t* inputs_constants_t::getTypeNameArrayPtr() {

test/symforce_function_codegen_test_data/sympy/codegen_multi_function_test_data/cpp/lcmtypes/codegen_multi_function_test/outputs_2_t.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ int outputs_2_t::getEncodedSize() const
144144

145145
constexpr int64_t outputs_2_t::getHash()
146146
{
147-
return _computeHash(NULL);
147+
return static_cast<int64_t>(_computeHash(NULL));
148148
}
149149

150150
constexpr outputs_2_t::type_name_array_t* outputs_2_t::getTypeNameArrayPtr() {

test/symforce_function_codegen_test_data/sympy/codegen_python_test_data/cpp/lcmtypes/codegen_python_test/constants_t.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ int constants_t::getEncodedSize() const
144144

145145
constexpr int64_t constants_t::getHash()
146146
{
147-
return _computeHash(NULL);
147+
return static_cast<int64_t>(_computeHash(NULL));
148148
}
149149

150150
constexpr constants_t::type_name_array_t* constants_t::getTypeNameArrayPtr() {

test/symforce_function_codegen_test_data/sympy/with_jacobians_values/cpp/lcmtypes/sym/d_out_t.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ int d_out_t::getEncodedSize() const
150150

151151
constexpr int64_t d_out_t::getHash()
152152
{
153-
return _computeHash(NULL);
153+
return static_cast<int64_t>(_computeHash(NULL));
154154
}
155155

156156
constexpr d_out_t::type_name_array_t* d_out_t::getTypeNameArrayPtr() {

third_party/skymarshal/skymarshal/templates/lcmtype.hpp.template

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ int64_t {{lcmtype.name}}::getHash()
223223
{% else %}
224224
constexpr int64_t {{lcmtype.name}}::getHash()
225225
{
226-
return _computeHash(NULL);
226+
return static_cast<int64_t>(_computeHash(NULL));
227227
}
228228
{% endif %}
229229

0 commit comments

Comments
 (0)