arrow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject arrow git commit: ARROW-1057: Fix cmake warning and msvc debug asserts
Date Tue, 23 May 2017 18:06:37 GMT
Repository: arrow
Updated Branches:
  refs/heads/master d48196a82 -> 8c00bb683


ARROW-1057: Fix cmake warning and msvc debug asserts

Author: rip.nsk <rip.nsk@gmail.com>

Closes #706 from rip-nsk/ARROW-1057 and squashes the following commits:

9bfe3199 [rip.nsk] Fix dependency of "arrow_objlib".
0c1e75d3 [rip.nsk] Fix "string iterator not dereferencable" assert
0b842c09 [rip.nsk] Fix "vector subscript out of range" assert


Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/8c00bb68
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/8c00bb68
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/8c00bb68

Branch: refs/heads/master
Commit: 8c00bb683e742f1f1ab9e07c21bf6266a2660932
Parents: d48196a
Author: rip.nsk <rip.nsk@gmail.com>
Authored: Tue May 23 14:06:32 2017 -0400
Committer: Wes McKinney <wes.mckinney@twosigma.com>
Committed: Tue May 23 14:06:32 2017 -0400

----------------------------------------------------------------------
 cpp/CMakeLists.txt                  | 3 +--
 cpp/src/arrow/array-decimal-test.cc | 3 +--
 cpp/src/arrow/util/decimal.cc       | 4 ++--
 3 files changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/arrow/blob/8c00bb68/cpp/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 0ad7ef5..d5483f2 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -949,10 +949,9 @@ add_subdirectory(src/arrow)
 add_subdirectory(src/arrow/io)
 if (ARROW_IPC)
   add_subdirectory(src/arrow/ipc)
+  set(ARROW_DEPENDENCIES ${ARROW_DEPENDENCIES} metadata_fbs)
 endif()
 
-set(ARROW_DEPENDENCIES ${ARROW_DEPENDENCIES} metadata_fbs)
-
 set(ARROW_SRCS
   src/arrow/array.cc
   src/arrow/buffer.cc

http://git-wip-us.apache.org/repos/asf/arrow/blob/8c00bb68/cpp/src/arrow/array-decimal-test.cc
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/array-decimal-test.cc b/cpp/src/arrow/array-decimal-test.cc
index 4bde7ab..fb4b8d9 100644
--- a/cpp/src/arrow/array-decimal-test.cc
+++ b/cpp/src/arrow/array-decimal-test.cc
@@ -75,8 +75,7 @@ class DecimalTest : public DecimalTestBase<T> {
  public:
   std::vector<uint8_t> data(
       const std::vector<T>& input, size_t byte_width) const override {
-    std::vector<uint8_t> result;
-    result.reserve(input.size() * byte_width);
+    std::vector<uint8_t> result(input.size() * byte_width);
     // TODO(phillipc): There's probably a better way to do this
     constexpr static const size_t bytes_per_element = sizeof(T);
     for (size_t i = 0, j = 0; i < input.size(); ++i, j += bytes_per_element) {

http://git-wip-us.apache.org/repos/asf/arrow/blob/8c00bb68/cpp/src/arrow/util/decimal.cc
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/util/decimal.cc b/cpp/src/arrow/util/decimal.cc
index 3d9fbd3..734df13 100644
--- a/cpp/src/arrow/util/decimal.cc
+++ b/cpp/src/arrow/util/decimal.cc
@@ -29,8 +29,8 @@ ARROW_EXPORT Status FromString(
   }
 
   int8_t sign = 1;
-  auto charp = s.cbegin();
-  auto end = s.cend();
+  auto charp = s.c_str();
+  auto end = charp + s.length();
 
   if (*charp == '+' || *charp == '-') {
     if (*charp == '-') { sign = -1; }


Mime
View raw message