From f80a759897dc5c89000cc5a7586042b092f574a1 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Tue, 19 Apr 2022 14:27:15 +0000 Subject: [PATCH] Suppress one threadsafe_fn error and enable lint. This CL suppresses the threadsafe_fn lint in the sample code and enables the lint check. Bug: dawn:1339 Change-Id: I51f6808b894ba1fcb7f3cdbbc274b35cd393dae8 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86864 Reviewed-by: Corentin Wallez Commit-Queue: Dan Sinclair Auto-Submit: Dan Sinclair --- src/dawn/CPPLINT.cfg | 1 - src/dawn/samples/Animometer.cpp | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dawn/CPPLINT.cfg b/src/dawn/CPPLINT.cfg index 7500cc9712..1ce2ca4480 100644 --- a/src/dawn/CPPLINT.cfg +++ b/src/dawn/CPPLINT.cfg @@ -7,4 +7,3 @@ filter=-readability/todo filter=-runtime/explicit filter=-runtime/indentation_namespace filter=-runtime/int -filter=-runtime/threadsafe_fn diff --git a/src/dawn/samples/Animometer.cpp b/src/dawn/samples/Animometer.cpp index 273cbce4fe..2548529432 100644 --- a/src/dawn/samples/Animometer.cpp +++ b/src/dawn/samples/Animometer.cpp @@ -31,6 +31,7 @@ wgpu::BindGroup bindGroup; wgpu::Buffer ubo; float RandomFloat(float min, float max) { + // NOLINTNEXTLINE(runtime/threadsafe_fn) float zeroOne = rand() / float(RAND_MAX); return zeroOne * (max - min) + min; }