diff --git a/src/common/logging.cpp b/src/common/logging.cpp index 9ebcc72d133..bb4f1f9b2a8 100644 --- a/src/common/logging.cpp +++ b/src/common/logging.cpp @@ -23,15 +23,14 @@ namespace dnnl { namespace impl { -log_manager_t::log_manager_t() { - +log_manager_t::log_manager_t() + : logfile_path_(getenv_string_user("VERBOSE_LOGFILE")) // enables logging as well as printing to stdout - console_flag_ = getenv_int_user("VERBOSE_LOG_WITH_CONSOLE", 0); + , console_flag_(getenv_int_user("VERBOSE_LOG_WITH_CONSOLE", 0)) { // logging is automatically disabled when no filepath is provided by // DNNL_VERBOSE_LOGFILE // in this case, we fall back to printing to stdout - logfile_path_ = getenv_string_user("VERBOSE_LOGFILE"); if (logfile_path_.empty()) { console_flag_ = true; return; diff --git a/src/common/memory.cpp b/src/common/memory.cpp index ade362c17cd..9e56e06385b 100644 --- a/src/common/memory.cpp +++ b/src/common/memory.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright 2016-2024 Intel Corporation +* Copyright 2016-2025 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -100,9 +100,10 @@ dnnl_memory::dnnl_memory(dnnl::impl::engine_t *engine, const dnnl::impl::memory_desc_t *md, std::vector> &&memory_storages) - : engine_(engine), md_(*md), counter_(1) { - memory_storages_ = std::move(memory_storages); -} + : engine_(engine) + , md_(*md) + , memory_storages_(std::move(memory_storages)) + , counter_(1) {} #endif status_t dnnl_memory::set_data_handle(void *handle, int index) const {