mirror of
https://github.com/wolfpld/tracy.git
synced 2026-11-12 02:45:30 +00:00
Use assert intead of a condition
This commit is contained in:
@@ -247,14 +247,10 @@ void record_callback( rocprofiler_dispatch_counting_service_data_t dispatch_data
|
||||
uint16_t query_id = 0;
|
||||
{
|
||||
auto _lk = std::unique_lock{ data->mut };
|
||||
if( data->dispatch_query_id.count( dispatch_data.dispatch_info.dispatch_id ) )
|
||||
{
|
||||
query_id = data->dispatch_query_id[dispatch_data.dispatch_info.dispatch_id];
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf( stderr, "oops\n" );
|
||||
}
|
||||
// An assumption is made here that the counter values are supplied after the dispatch
|
||||
// complete callback.
|
||||
assert( data->dispatch_query_id.count( dispatch_data.dispatch_info.dispatch_id ) );
|
||||
query_id = data->dispatch_query_id[dispatch_data.dispatch_info.dispatch_id];
|
||||
}
|
||||
|
||||
for( auto& p : sums )
|
||||
|
||||
Reference in New Issue
Block a user