Revert "Fix clang-tidy warnings in Caffe2 code (#134935)"

This reverts commit 7cfd23636c8fa6fcbb8bf3ea34e15b847ec9ad9d.

Reverted https://github.com/pytorch/pytorch/pull/134935 on behalf of https://github.com/izaitsevfb due to breaks internal builds, caffe2 is still used internally ([comment](https://github.com/pytorch/pytorch/pull/134935#issuecomment-2349368152))
This commit is contained in:
PyTorch MergeBot
2024-09-13 16:42:37 +00:00
parent ae02d663cd
commit 564d00f364
28 changed files with 150 additions and 112 deletions

View File

@ -7,7 +7,9 @@ namespace caffe2 {
namespace {
static thread_local bool using_new_threadpool{false};
}
WithCastToNewThreadPool::WithCastToNewThreadPool(bool use_new_threadpool) : use_new_threadpool_(using_new_threadpool) {
WithCastToNewThreadPool::WithCastToNewThreadPool(bool use_new_threadpool) {
use_new_threadpool_ = using_new_threadpool;
using_new_threadpool = use_new_threadpool;
}
WithCastToNewThreadPool::~WithCastToNewThreadPool() {
using_new_threadpool = use_new_threadpool_;