This is an automated email from the ASF dual-hosted git repository.

gangwu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/orc.git


The following commit(s) were added to refs/heads/main by this push:
     new b3491a3db ORC-1348: [C++] TimezoneImpl constructor passes vector by 
reference
b3491a3db is described below

commit b3491a3db7d4168c65904308d0bd2b0dc07a6b5f
Author: Junwang Zhao <[email protected]>
AuthorDate: Mon Jan 9 11:58:59 2023 +0800

    ORC-1348: [C++] TimezoneImpl constructor passes vector by reference
    
    Timezone file might be hundreds or thousands of bytes, passing
    references of byte vector should be more efficient. Make declaration
    and definition parameter names consistent.
    
    Signed-off-by: Junwang Zhao <[email protected]>
    
    This closes #1358
---
 c++/src/Timezone.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/c++/src/Timezone.cc b/c++/src/Timezone.cc
index fe67090b2..e232a9e2a 100644
--- a/c++/src/Timezone.cc
+++ b/c++/src/Timezone.cc
@@ -565,7 +565,7 @@ namespace orc {
 
   class TimezoneImpl : public Timezone {
    public:
-    TimezoneImpl(const std::string& name, const std::vector<unsigned char> 
bytes);
+    TimezoneImpl(const std::string& _filename, const std::vector<unsigned 
char>& buffer);
     virtual ~TimezoneImpl() override;
 
     /**
@@ -633,7 +633,7 @@ namespace orc {
     // PASS
   }
 
-  TimezoneImpl::TimezoneImpl(const std::string& _filename, const 
std::vector<unsigned char> buffer)
+  TimezoneImpl::TimezoneImpl(const std::string& _filename, const 
std::vector<unsigned char>& buffer)
       : filename(_filename) {
     parseZoneFile(&buffer[0], 0, buffer.size(), Version1Parser());
     // Build the literal for the ORC epoch

Reply via email to