mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Address review comments
* Convert %x to {:x}
* Convert {0:#010x} to {:#010x}
* Remove `? true : false` statement
* Remove `.c_str()` for strings
			
			
This commit is contained in:
		
							parent
							
								
									693b190274
								
							
						
					
					
						commit
						df816b5eaf
					
				
					 8 changed files with 17 additions and 17 deletions
				
			
		|  | @ -80,7 +80,7 @@ void Mixers::ParseConfig(DspConfiguration& config) { | |||
|     } | ||||
| 
 | ||||
|     if (config.dirty_raw) { | ||||
|         NGLOG_DEBUG(Audio_DSP, "mixers remaining_dirty={}", config.dirty_raw); | ||||
|         NGLOG_DEBUG(Audio_DSP, "mixers remaining_dirty={:x}", config.dirty_raw); | ||||
|     } | ||||
| 
 | ||||
|     config.dirty_raw = 0; | ||||
|  |  | |||
|  | @ -182,14 +182,14 @@ void Source::ParseConfig(SourceConfiguration::Configuration& config, | |||
|             play_position, | ||||
|             false, | ||||
|         }); | ||||
|         NGLOG_TRACE(Audio_DSP, "enqueuing embedded addr={0:#010x} len={} id={} start={}", | ||||
|         NGLOG_TRACE(Audio_DSP, "enqueuing embedded addr={:#010x} len={} id={} start={}", | ||||
|                     config.physical_address, config.length, config.buffer_id, | ||||
|                     static_cast<u32>(config.play_position)); | ||||
|     } | ||||
| 
 | ||||
|     if (config.loop_related_dirty && config.loop_related != 0) { | ||||
|         config.loop_related_dirty.Assign(0); | ||||
|         NGLOG_WARNING(Audio_DSP, "Unhandled complex loop with loop_related={0:#010x}", | ||||
|         NGLOG_WARNING(Audio_DSP, "Unhandled complex loop with loop_related={:#010x}", | ||||
|                       static_cast<u32>(config.loop_related)); | ||||
|     } | ||||
| 
 | ||||
|  | @ -212,7 +212,7 @@ void Source::ParseConfig(SourceConfiguration::Configuration& config, | |||
|                     {}, // 0 in u32_dsp
 | ||||
|                     false, | ||||
|                 }); | ||||
|                 NGLOG_TRACE(Audio_DSP, "enqueuing queued {} addr={0:#010x} len={} id={}", i, | ||||
|                 NGLOG_TRACE(Audio_DSP, "enqueuing queued {} addr={:#010x} len={} id={}", i, | ||||
|                             b.physical_address, b.length, b.buffer_id); | ||||
|             } | ||||
|         } | ||||
|  | @ -220,7 +220,7 @@ void Source::ParseConfig(SourceConfiguration::Configuration& config, | |||
|     } | ||||
| 
 | ||||
|     if (config.dirty_raw) { | ||||
|         NGLOG_DEBUG(Audio_DSP, "source_id={} remaining_dirty={}", source_id, config.dirty_raw); | ||||
|         NGLOG_DEBUG(Audio_DSP, "source_id={} remaining_dirty={:x}", source_id, config.dirty_raw); | ||||
|     } | ||||
| 
 | ||||
|     config.dirty_raw = 0; | ||||
|  | @ -305,7 +305,7 @@ bool Source::DequeueBuffer() { | |||
|         } | ||||
|     } else { | ||||
|         NGLOG_WARNING(Audio_DSP, | ||||
|                       "source_id={} buffer_id={} length={}: Invalid physical address {0:#010x}", | ||||
|                       "source_id={} buffer_id={} length={}: Invalid physical address {:#010x}", | ||||
|                       source_id, buf.buffer_id, buf.length, buf.physical_address); | ||||
|         state.current_buffer.clear(); | ||||
|         return true; | ||||
|  | @ -323,7 +323,7 @@ bool Source::DequeueBuffer() { | |||
|     } | ||||
| 
 | ||||
|     NGLOG_TRACE(Audio_DSP, "source_id={} buffer_id={} from_queue={} current_buffer.size()={}", | ||||
|                 source_id, buf.buffer_id, buf.from_queue ? "true" : "false", | ||||
|                 source_id, buf.buffer_id, buf.from_queue, | ||||
|                 state.current_buffer.size()); | ||||
|     return true; | ||||
| } | ||||
|  |  | |||
|  | @ -59,7 +59,7 @@ SDL2Sink::SDL2Sink() : impl(std::make_unique<Impl>()) { | |||
|         device, false, &desired_audiospec, &obtained_audiospec, SDL_AUDIO_ALLOW_FREQUENCY_CHANGE); | ||||
|     if (impl->audio_device_id <= 0) { | ||||
|         NGLOG_CRITICAL(Audio_Sink, "SDL_OpenAudioDevice failed with code {} for device \"{}\"", | ||||
|                        impl->audio_device_id, Settings::values.audio_device_id.c_str()); | ||||
|                        impl->audio_device_id, Settings::values.audio_device_id); | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
|  | @ -30,7 +30,7 @@ const SinkDetails& GetSinkDetails(std::string sink_id) { | |||
| 
 | ||||
|     if (sink_id == "auto" || iter == g_sink_details.end()) { | ||||
|         if (sink_id != "auto") { | ||||
|             NGLOG_ERROR(Audio, "AudioCore::SelectSink given invalid sink_id {}", sink_id.c_str()); | ||||
|             NGLOG_ERROR(Audio, "AudioCore::SelectSink given invalid sink_id {}", sink_id); | ||||
|         } | ||||
|         // Auto-select.
 | ||||
|         // g_sink_details is ordered in terms of desirability, with the best choice at the front.
 | ||||
|  |  | |||
|  | @ -591,15 +591,15 @@ void GraphicsVertexShaderWidget::OnCycleIndexChanged(int index) { | |||
|                     .arg(record.address_registers[1]); | ||||
|     if (record.mask & Pica::Shader::DebugDataRecord::CMP_RESULT) | ||||
|         text += tr("Compare Result: %1, %2\n") | ||||
|                     .arg(record.conditional_code[0] ? "true" : "false") | ||||
|                     .arg(record.conditional_code[1] ? "true" : "false"); | ||||
|                     .arg(record.conditional_code[0]) | ||||
|                     .arg(record.conditional_code[1]); | ||||
| 
 | ||||
|     if (record.mask & Pica::Shader::DebugDataRecord::COND_BOOL_IN) | ||||
|         text += tr("Static Condition: %1\n").arg(record.cond_bool ? "true" : "false"); | ||||
|         text += tr("Static Condition: %1\n").arg(record.cond_bool); | ||||
|     if (record.mask & Pica::Shader::DebugDataRecord::COND_CMP_IN) | ||||
|         text += tr("Dynamic Conditions: %1, %2\n") | ||||
|                     .arg(record.cond_cmp[0] ? "true" : "false") | ||||
|                     .arg(record.cond_cmp[1] ? "true" : "false"); | ||||
|                     .arg(record.cond_cmp[0]) | ||||
|                     .arg(record.cond_cmp[1]); | ||||
|     if (record.mask & Pica::Shader::DebugDataRecord::LOOP_INT_IN) | ||||
|         text += tr("Loop Parameters: %1 (repeats), %2 (initializer), %3 (increment), %4\n") | ||||
|                     .arg(record.loop_int.x) | ||||
|  |  | |||
|  | @ -189,7 +189,7 @@ bool TryParse(const std::string& str, bool* const output) { | |||
| } | ||||
| 
 | ||||
| std::string StringFromBool(bool value) { | ||||
|     return value ? "True" : "False"; | ||||
|     return value; | ||||
| } | ||||
| 
 | ||||
| bool SplitPath(const std::string& full_path, std::string* _pPath, std::string* _pFilename, | ||||
|  |  | |||
|  | @ -827,7 +827,7 @@ static ResultCode CreateMutex(Handle* out_handle, u32 initial_locked) { | |||
|     CASCADE_RESULT(*out_handle, g_handle_table.Create(std::move(mutex))); | ||||
| 
 | ||||
|     LOG_TRACE(Kernel_SVC, "called initial_locked=%s : created handle=0x%08X", | ||||
|               initial_locked ? "true" : "false", *out_handle); | ||||
|               initial_locked, *out_handle); | ||||
| 
 | ||||
|     return RESULT_SUCCESS; | ||||
| } | ||||
|  |  | |||
|  | @ -202,7 +202,7 @@ void RO::LoadCRO(Kernel::HLERequestContext& ctx, bool link_on_load_bug_fix) { | |||
|               "fix_level=%d, crr_address=0x%08X", | ||||
|               link_on_load_bug_fix ? "new" : "old", cro_buffer_ptr, cro_address, cro_size, | ||||
|               data_segment_address, zero, data_segment_size, bss_segment_address, bss_segment_size, | ||||
|               auto_link ? "true" : "false", fix_level, crr_address); | ||||
|               auto_link, fix_level, crr_address); | ||||
| 
 | ||||
|     IPC::RequestBuilder rb = rp.MakeBuilder(2, 0); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue