@@ -301,7 +301,7 @@ void MachOWriter::writeSymbolTable() {
301301 O.LoadCommands [*O.SymTabCommandIndex ]
302302 .MachOLoadCommand .symtab_command_data ;
303303
304- char *SymTable = ( char *) Buf->getBufferStart () + SymTabCommand.symoff ;
304+ char *SymTable = Buf->getBufferStart () + SymTabCommand.symoff ;
305305 for (auto &Symbol : O.SymTable .Symbols ) {
306306 SymbolEntry *Sym = Symbol.get ();
307307 uint32_t Nstrx = LayoutBuilder.getStringTableBuilder ().getOffset (Sym->Name );
@@ -319,7 +319,7 @@ void MachOWriter::writeRebaseInfo() {
319319 const MachO::dyld_info_command &DyLdInfoCommand =
320320 O.LoadCommands [*O.DyLdInfoCommandIndex ]
321321 .MachOLoadCommand .dyld_info_command_data ;
322- char *Out = ( char *) Buf->getBufferStart () + DyLdInfoCommand.rebase_off ;
322+ char *Out = Buf->getBufferStart () + DyLdInfoCommand.rebase_off ;
323323 assert ((DyLdInfoCommand.rebase_size == O.Rebases .Opcodes .size ()) &&
324324 " Incorrect rebase opcodes size" );
325325 memcpy (Out, O.Rebases .Opcodes .data (), O.Rebases .Opcodes .size ());
@@ -331,7 +331,7 @@ void MachOWriter::writeBindInfo() {
331331 const MachO::dyld_info_command &DyLdInfoCommand =
332332 O.LoadCommands [*O.DyLdInfoCommandIndex ]
333333 .MachOLoadCommand .dyld_info_command_data ;
334- char *Out = ( char *) Buf->getBufferStart () + DyLdInfoCommand.bind_off ;
334+ char *Out = Buf->getBufferStart () + DyLdInfoCommand.bind_off ;
335335 assert ((DyLdInfoCommand.bind_size == O.Binds .Opcodes .size ()) &&
336336 " Incorrect bind opcodes size" );
337337 memcpy (Out, O.Binds .Opcodes .data (), O.Binds .Opcodes .size ());
@@ -343,7 +343,7 @@ void MachOWriter::writeWeakBindInfo() {
343343 const MachO::dyld_info_command &DyLdInfoCommand =
344344 O.LoadCommands [*O.DyLdInfoCommandIndex ]
345345 .MachOLoadCommand .dyld_info_command_data ;
346- char *Out = ( char *) Buf->getBufferStart () + DyLdInfoCommand.weak_bind_off ;
346+ char *Out = Buf->getBufferStart () + DyLdInfoCommand.weak_bind_off ;
347347 assert ((DyLdInfoCommand.weak_bind_size == O.WeakBinds .Opcodes .size ()) &&
348348 " Incorrect weak bind opcodes size" );
349349 memcpy (Out, O.WeakBinds .Opcodes .data (), O.WeakBinds .Opcodes .size ());
@@ -355,7 +355,7 @@ void MachOWriter::writeLazyBindInfo() {
355355 const MachO::dyld_info_command &DyLdInfoCommand =
356356 O.LoadCommands [*O.DyLdInfoCommandIndex ]
357357 .MachOLoadCommand .dyld_info_command_data ;
358- char *Out = ( char *) Buf->getBufferStart () + DyLdInfoCommand.lazy_bind_off ;
358+ char *Out = Buf->getBufferStart () + DyLdInfoCommand.lazy_bind_off ;
359359 assert ((DyLdInfoCommand.lazy_bind_size == O.LazyBinds .Opcodes .size ()) &&
360360 " Incorrect lazy bind opcodes size" );
361361 memcpy (Out, O.LazyBinds .Opcodes .data (), O.LazyBinds .Opcodes .size ());
@@ -367,7 +367,7 @@ void MachOWriter::writeExportInfo() {
367367 const MachO::dyld_info_command &DyLdInfoCommand =
368368 O.LoadCommands [*O.DyLdInfoCommandIndex ]
369369 .MachOLoadCommand .dyld_info_command_data ;
370- char *Out = ( char *) Buf->getBufferStart () + DyLdInfoCommand.export_off ;
370+ char *Out = Buf->getBufferStart () + DyLdInfoCommand.export_off ;
371371 assert ((DyLdInfoCommand.export_size == O.Exports .Trie .size ()) &&
372372 " Incorrect export trie size" );
373373 memcpy (Out, O.Exports .Trie .data (), O.Exports .Trie .size ());
@@ -397,7 +397,7 @@ void MachOWriter::writeLinkData(std::optional<size_t> LCIndex,
397397 return ;
398398 const MachO::linkedit_data_command &LinkEditDataCommand =
399399 O.LoadCommands [*LCIndex].MachOLoadCommand .linkedit_data_command_data ;
400- char *Out = ( char *) Buf->getBufferStart () + LinkEditDataCommand.dataoff ;
400+ char *Out = Buf->getBufferStart () + LinkEditDataCommand.dataoff ;
401401 assert ((LinkEditDataCommand.datasize == LD.Data .size ()) &&
402402 " Incorrect data size" );
403403 memcpy (Out, LD.Data .data (), LD.Data .size ());
@@ -574,7 +574,7 @@ void MachOWriter::writeExportsTrieData() {
574574 const MachO::linkedit_data_command &ExportsTrieCmd =
575575 O.LoadCommands [*O.ExportsTrieCommandIndex ]
576576 .MachOLoadCommand .linkedit_data_command_data ;
577- char *Out = ( char *) Buf->getBufferStart () + ExportsTrieCmd.dataoff ;
577+ char *Out = Buf->getBufferStart () + ExportsTrieCmd.dataoff ;
578578 assert ((ExportsTrieCmd.datasize == O.Exports .Trie .size ()) &&
579579 " Incorrect export trie size" );
580580 memcpy (Out, O.Exports .Trie .data (), O.Exports .Trie .size ());
0 commit comments