mirror of
https://github.com/a2x/cs2-dumper.git
synced 2026-04-18 02:09:58 +08:00
Print field types
This commit is contained in:
@@ -22,14 +22,25 @@ impl FileBuilder for CppBuilder {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn write_variable(&mut self, output: &mut dyn Write, name: &str, value: usize) -> Result<()> {
|
||||
write!(
|
||||
output,
|
||||
" constexpr std::ptrdiff_t {} = {:#X};\n",
|
||||
name, value
|
||||
)?;
|
||||
|
||||
Ok(())
|
||||
fn write_variable(
|
||||
&mut self,
|
||||
output: &mut dyn Write,
|
||||
name: &str,
|
||||
value: usize,
|
||||
comment: Option<&str>,
|
||||
) -> Result<()> {
|
||||
match comment {
|
||||
Some(comment) => write!(
|
||||
output,
|
||||
" constexpr std::ptrdiff_t {} = {:#X}; // {}\n",
|
||||
name, value, comment
|
||||
),
|
||||
None => write!(
|
||||
output,
|
||||
" constexpr std::ptrdiff_t {} = {:#X};\n",
|
||||
name, value
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
fn write_closure(&mut self, output: &mut dyn Write, eof: bool) -> Result<()> {
|
||||
|
||||
Reference in New Issue
Block a user