Skip to content

Commit

Permalink
drop braces
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhar committed Nov 3, 2023
1 parent 3785d82 commit 97966b7
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions uvkc/benchmark/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ ABSL_FLAG(uvkc::benchmark::LatencyMeasureMode, latency_measure_mode,
static RENDERDOC_API_1_6_0 *GetRdocApi() {
static bool initialized = false;
static RENDERDOC_API_1_6_0 *rdoc_api = nullptr;
if (initialized) {
return rdoc_api;
}
if (initialized) return rdoc_api;

// Only attempt to initialize once. If the first attempt fails, we will always
// return `nullptr` in the future.
Expand All @@ -109,19 +107,15 @@ static RENDERDOC_API_1_6_0 *GetRdocApi() {

static void StartRenderDocCapture(VkInstance instance) {
auto *rdoc_api = GetRdocApi();
if (!rdoc_api) {
return;
}
if (!rdoc_api) return;

void *device = RENDERDOC_DEVICEPOINTER_FROM_VKINSTANCE(instance);
rdoc_api->StartFrameCapture(device, /*wndHandle=*/nullptr);
}

static void EndRenderDocCapture(VkInstance instance) {
auto *rdoc_api = GetRdocApi();
if (!rdoc_api) {
return;
}
if (!rdoc_api) return;

void *device = RENDERDOC_DEVICEPOINTER_FROM_VKINSTANCE(instance);
rdoc_api->EndFrameCapture(device, /*wndHandle=*/nullptr);
Expand Down

0 comments on commit 97966b7

Please sign in to comment.