From patchwork Tue Oct 5 07:31:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 14044 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 5AC3CBDC71 for ; Tue, 5 Oct 2021 07:31:27 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C9789691B8; Tue, 5 Oct 2021 09:31:26 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="HdmmOF+s"; dkim-atps=neutral Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D1DCA684C6 for ; Tue, 5 Oct 2021 09:31:24 +0200 (CEST) Received: by mail-pl1-x631.google.com with SMTP id b22so1723601pls.1 for ; Tue, 05 Oct 2021 00:31:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=epvkAwYKytUVDvQGVX7nK9C8n6cTt+a33JE1lvs5+NI=; b=HdmmOF+sJ1T7idxK7uOihLLAksPp21awjC8cP4Kb66Xa+8zNxpqrKRHgCu1Zh+9Za8 BZiXtEbnyUVUtXf7W6GsnhHCjAIHzQv3Bgpftg3tm+xFwWeKVtCOwPHkHIl/ChEGImCN YIgmOZb06rN8Lg+vQ1ws06WvMFoSWifwdrClQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=epvkAwYKytUVDvQGVX7nK9C8n6cTt+a33JE1lvs5+NI=; b=nxqnvFACz2TfTWfO2Vkdn9F5NegF7n6BDHw1O0vn+zWvL7Gu32eD6UgYD6f4hfcvLx GzuaufRdAg7uMlvCNFSE4xtgiGZrBhMOMJVRD2vy5poOjnDFzHUmgxTYwPGER3kEm0fW oS6TAThUlK7l3gaUozvuqmX6rP3KRZRHXCa+1fC8AQBGGBpK0yVBlQw6aqhntKPrKT0o CdpqqIA4Z6iHe7YxOYw/QcI2xJwVLxP8F9StwUquScqitygD3kIziofcula4T6v0EC/Z DNU5SfDxPsACRExk7bqu/EdcydR+4UzQ2XTV4pOso5iABOQiC1e0rfrKczgVTSw4s5fW X9JQ== X-Gm-Message-State: AOAM530J75rILBJ6n172qsPfA0UjB6Le5FV30tDHybHE2iHzbDShW/zo Nw297LXJb7czzXBmSjX9ubaBrWG4jSUjig== X-Google-Smtp-Source: ABdhPJwEGpT0scOSTpXC8U0i1B17NC1eLnGAfOVA61C8Rr3VnvkBl69TBGSPjB0pBi4dgC252BCymQ== X-Received: by 2002:a17:902:ed8a:b0:13e:c68e:c2d3 with SMTP id e10-20020a170902ed8a00b0013ec68ec2d3mr3870184plj.77.1633419082937; Tue, 05 Oct 2021 00:31:22 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:203:debc:d0db:3bd8:f961]) by smtp.gmail.com with ESMTPSA id o14sm16761812pfh.145.2021.10.05.00.31.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 00:31:22 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Tue, 5 Oct 2021 16:31:08 +0900 Message-Id: <20211005073114.3997303-1-hiroh@chromium.org> X-Mailer: git-send-email 2.33.0.800.g4c38ced690-goog MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 0/6] Remove using namespace in header files X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" According to Google C++ style guide, using-directives (i.e. "using namespace foo") should not be used. However, libcamera has been using the scheme in many files. Removing using-directives entirely in the code definitely needs the dicussion. This patch series resolves the porblem of using using-directives in header file, which I expect I can handily get the agreement from developers. Using-directives in a header file is propagated to all the files including the header file. This pollutes namespace severely. [1] https://google.github.io/styleguide/cppguide.html#Namespaces Hirokazu Honda (6): ipa: raspberrypi: agc: Remove using namespace in agc.hpp cam: Remove using namespace in stream_options.h qcam: Remove using namespace in header files v4l2: Remove using namespace in header files lc-compliance: Remove using namespace in header files test: Remove using namespace in header files src/cam/stream_options.h | 8 ++-- src/ipa/raspberrypi/controller/rpi/agc.cpp | 7 ++++ src/ipa/raspberrypi/controller/rpi/agc.hpp | 6 +-- src/lc-compliance/environment.cpp | 2 +- src/lc-compliance/environment.h | 8 ++-- src/qcam/dng_writer.h | 10 ++--- src/qcam/main.cpp | 2 +- src/qcam/main_window.h | 40 +++++++++---------- src/v4l2/v4l2_camera.h | 37 +++++++++-------- src/v4l2/v4l2_camera_proxy.h | 15 ++++--- src/v4l2/v4l2_compat_manager.h | 4 +- test/camera/camera_reconfigure.cpp | 1 + test/camera/capture.cpp | 1 + test/camera/configuration_default.cpp | 1 + test/camera/configuration_set.cpp | 1 + test/camera/statemachine.cpp | 1 + test/gstreamer/gstreamer_test.h | 2 - test/libtest/buffer_source.cpp | 2 + test/libtest/buffer_source.h | 10 ++--- test/libtest/camera_test.h | 6 +-- test/mapped-buffer.cpp | 1 + test/media_device/media_device_test.h | 6 +-- test/serialization/serialization_test.h | 10 ++--- test/v4l2_subdevice/v4l2_subdevice_test.h | 8 ++-- test/v4l2_videodevice/buffer_sharing.cpp | 2 + test/v4l2_videodevice/capture_async.cpp | 2 + test/v4l2_videodevice/v4l2_videodevice_test.h | 14 +++---- 27 files changed, 100 insertions(+), 107 deletions(-) --- 2.33.0.800.g4c38ced690-goog