From issues-return-638-archive-asf-public=cust-asf.ponee.io@avro.apache.org Tue Mar 23 15:43:06 2021 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-he-de.apache.org (mxout1-he-de.apache.org [95.216.194.37]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id 53BD71804BB for ; Tue, 23 Mar 2021 16:43:06 +0100 (CET) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-he-de.apache.org (ASF Mail Server at mxout1-he-de.apache.org) with SMTP id C9D6B62CB5 for ; Tue, 23 Mar 2021 15:43:05 +0000 (UTC) Received: (qmail 82241 invoked by uid 500); 23 Mar 2021 15:43:05 -0000 Mailing-List: contact issues-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@avro.apache.org Delivered-To: mailing list issues@avro.apache.org Received: (qmail 82232 invoked by uid 99); 23 Mar 2021 15:43:05 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Mar 2021 15:43:05 +0000 From: =?utf-8?q?GitBox?= To: issues@avro.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bavro=5D_emkornfield_commented_on_a_change_in_pull_?= =?utf-8?q?request_=231153=3A_AVRO-3051=3A_C++_Reader_and_writers_modernized?= Message-ID: <161651418510.15632.8241900541697757342.asfpy@gitbox.apache.org> Date: Tue, 23 Mar 2021 15:43:05 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit References: In-Reply-To: emkornfield commented on a change in pull request #1153: URL: https://github.com/apache/avro/pull/1153#discussion_r599691253 ########## File path: lang/c++/impl/DataFile.cc ########## @@ -306,20 +306,20 @@ void DataFileReaderBase::init(const ValidSchema& readerSchema) static void drain(InputStream& in) { - const uint8_t *p = 0; + const uint8_t *p = nullptr; size_t n = 0; while (in.next(&p, &n)); } char hex(unsigned int x) { - return x + (x < 10 ? '0' : ('a' - 10)); + return static_cast(x + (x < 10 ? '0' : ('a' - 10))); } std::ostream& operator << (std::ostream& os, const DataFileSync& s) { - for (size_t i = 0; i < s.size(); ++i) { - os << hex(s[i] / 16) << hex(s[i] % 16) << ' '; + for (unsigned char i : s) { Review comment: it looks like elsewhere uint8_t might be used of rhte same type? -- 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. For queries about this service, please contact Infrastructure at: users@infra.apache.org