Skip to content

Commit

Permalink
fix performance-unnecessary-value-param and bugprone-narrowing-conver…
Browse files Browse the repository at this point in the history
…sion issues
  • Loading branch information
lucafedeli88 committed Oct 30, 2024
1 parent 917b8c9 commit ccf4149
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions multi_physics/QED/python_bindings/pxr_qed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ PYBIND11_MODULE(pxr_qed, m) {
py::arg("do_regular") = py::bool_(true),
py::arg("verbose") = py::bool_(true))
.def("save_as",
[&](const bw_dndt_lookup_table &self, const std::string file_name){
[&](const bw_dndt_lookup_table &self, const std::string& file_name){
if(!self.is_init()){
throw_error("Table must be initialized!");
}
Expand All @@ -1074,12 +1074,12 @@ PYBIND11_MODULE(pxr_qed, m) {
if( !of ){
throw_error("Opening file failed!");
}
of.write(raw.data(), raw.size());
of.write(raw.data(), static_cast<int>(raw.size()));
of.close();
},
py::arg("file_name"))
.def("load_from",
[&](bw_dndt_lookup_table &self, const std::string file_name){
[&](bw_dndt_lookup_table &self, const std::string& file_name){
auto input = std::ifstream(file_name,
std::ios::ate | std::ios::binary);
if( !input ){
Expand Down Expand Up @@ -1147,7 +1147,7 @@ PYBIND11_MODULE(pxr_qed, m) {
if( !of ){
throw_error("Opening file failed!");
}
of.write(raw.data(), raw.size());
of.write(raw.data(), static_cast<int>(raw.size()));
of.close();
},
py::arg("file_name"))
Expand Down Expand Up @@ -1302,7 +1302,7 @@ PYBIND11_MODULE(pxr_qed, m) {
if( !of ){
throw_error("Opening file failed!");
}
of.write(raw.data(), raw.size());
of.write(raw.data(), static_cast<int>(raw.size()));
of.close();
},
py::arg("file_name"))
Expand Down Expand Up @@ -1375,7 +1375,7 @@ PYBIND11_MODULE(pxr_qed, m) {
if( !of ){
throw_error("Opening file failed!");
}
of.write(raw.data(), raw.size());
of.write(raw.data(), static_cast<int>(raw.size()));
of.close();
},
py::arg("file_name"))
Expand Down

0 comments on commit ccf4149

Please sign in to comment.