X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=include%2Fhfta%2Frunning_gb_operator.h;fp=include%2Fhfta%2Frunning_gb_operator.h;h=3dbe9460c37faaf7f800a02ad7b7991355ea8b8b;hb=393a42a5b1ba6e64bd3eabf7d0ce2f197e966355;hp=569bbc450e30f41731d9140a90b53cf254b175aa;hpb=5a4f9d3d8846452b1b99302d03368565863df62a;p=com%2Fgs-lite.git diff --git a/include/hfta/running_gb_operator.h b/include/hfta/running_gb_operator.h index 569bbc4..3dbe946 100644 --- a/include/hfta/running_gb_operator.h +++ b/include/hfta/running_gb_operator.h @@ -74,11 +74,11 @@ public: if ((iter = group_table.find(grp)) != group_table.end()) { func.update_aggregate(tup, grp, (*iter).second); }else{ - aggregate aggr; + char aggr_buffer[sizeof(aggregate)]; // create an aggregate in preallocated buffer - func.create_aggregate(tup, (char*)&aggr); + func.create_aggregate(tup, aggr_buffer); // neeed operator= doing a deep copy - group_table.insert(grp, aggr); + group_table.insert(grp, (*(aggregate*)aggr_buffer)); } tup.free_tuple(); return 0;