File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77endif ()
88
99function (configure_clang_tidy TARGET )
10- if (CLANG_TIDY_EXE)
10+ if (CLANG_TIDY_EXE AND CMAKE_BUILD_TYPE STREQUAL "Debug" )
1111 set_target_properties (${TARGET} PROPERTIES
1212 CXX_CLANG_TIDY "${CLANG_TIDY_EXE} ;--use-color;--extra-arg=-Wno-unknown-warning-option"
1313 )
Original file line number Diff line number Diff line change @@ -65,9 +65,10 @@ namespace llarm::emu {
6565 const std::size_t file_size = static_cast <std::size_t >(file.tellg ());
6666 file.seekg (0 );
6767
68- std::vector<u8 > data;
69- data.reserve (file_size);
70- data.assign (std::istreambuf_iterator<char >(file), std::istreambuf_iterator<char >());
68+ std::vector<u8 > data (file_size);
69+
70+ // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
71+ file.read (reinterpret_cast <char *>(data.data ()), static_cast <std::streamsize>(file_size));
7172
7273 return data;
7374 }
You can’t perform that action at this time.
0 commit comments