pitrou commented on code in PR #37752:
URL: https://github.com/apache/arrow/pull/37752#discussion_r1350426368
##########
cpp/src/gandiva/exported_funcs_registry.h:
##########
@@ -21,34 +21,31 @@
#include <vector>
#include <gandiva/engine.h>
+#include <gandiva/visibility.h>
namespace gandiva {
class ExportedFuncsBase;
/// Registry for classes that export functions which can be accessed by
/// LLVM/IR code.
-class ExportedFuncsRegistry {
+class GANDIVA_EXPORT ExportedFuncsRegistry {
public:
using list_type = std::vector<std::shared_ptr<ExportedFuncsBase>>;
// Add functions from all the registered classes to the engine.
static void AddMappings(Engine* engine);
static bool Register(std::shared_ptr<ExportedFuncsBase> entry) {
- registered().push_back(entry);
+ registered().emplace_back(std::move(entry));
return true;
}
- private:
- static list_type& registered() {
- static list_type registered_list;
- return registered_list;
- }
+ static list_type& registered();
Review Comment:
Our coding conventions favor pointers over mutable refs.
```suggestion
static list_type* registered();
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]