You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@parquet.apache.org by uw...@apache.org on 2018/04/17 17:03:22 UTC

[parquet-cpp] branch master updated: PARQUET-1267: [C++] replace "unsafe" std::equal by std::memcmp

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

uwe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/parquet-cpp.git


The following commit(s) were added to refs/heads/master by this push:
     new 8735514  PARQUET-1267: [C++] replace "unsafe" std::equal by std::memcmp
8735514 is described below

commit 8735514542d963c87a75ac8f722d47d5683825aa
Author: rip.nsk <ri...@gmail.com>
AuthorDate: Tue Apr 17 19:03:16 2018 +0200

    PARQUET-1267: [C++] replace "unsafe" std::equal by std::memcmp
    
    Author: rip.nsk <ri...@gmail.com>
    
    Closes #451 from rip-nsk/PARQUET-1267 and squashes the following commits:
    
    12d2386 [rip.nsk] fix of the fix.
    7682c83 [rip.nsk] PARQUET-1267: [C++] replace "unsafe" std::equal by std::memcmp
---
 src/parquet/types.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/parquet/types.h b/src/parquet/types.h
index 2179d50..04cfc4b 100644
--- a/src/parquet/types.h
+++ b/src/parquet/types.h
@@ -155,7 +155,7 @@ struct ByteArray {
 };
 
 inline bool operator==(const ByteArray& left, const ByteArray& right) {
-  return left.len == right.len && std::equal(left.ptr, left.ptr + left.len, right.ptr);
+  return left.len == right.len && 0 == std::memcmp(left.ptr, right.ptr, left.len);
 }
 
 inline bool operator!=(const ByteArray& left, const ByteArray& right) {

-- 
To stop receiving notification emails like this one, please contact
uwe@apache.org.