mirror of
https://github.com/pcvolkmer/osc-variant.git
synced 2025-04-20 20:26:50 +00:00
chore: code cleanup
This commit is contained in:
parent
5e297a0353
commit
79193ba91b
@ -30,7 +30,10 @@ void deob(char * in) {
|
||||
for (size_t i = 0; i < DL; i++) d[i] = (CS)[i];
|
||||
size_t l = strlen(in) / 2;
|
||||
for (size_t i = 0; i < l; i++) {
|
||||
for (size_t j = 0; j < DL; j++) { DLT(0); DLT(1); }
|
||||
for (size_t j = 0; j < DL; j++) {
|
||||
DLT(0);
|
||||
DLT(1);
|
||||
}
|
||||
DLS(i);
|
||||
}
|
||||
INZ(l);
|
||||
|
@ -32,7 +32,7 @@
|
||||
#define S0 8373972096940928081
|
||||
#define S1 7378413942531504450
|
||||
#define CS (char*)&s
|
||||
#define DL sizeof(d) / sizeof(d[0]) - 2
|
||||
#define DL sizeof(d) / sizeof(d[0]) - 3
|
||||
#define I2 i*2
|
||||
#define INZ(var) in[var] = 0
|
||||
#define DLS(idx) in[idx] = (d[DL+1]<<4)|d[DL]
|
||||
|
@ -141,7 +141,7 @@ impl InputFile {
|
||||
}
|
||||
} else {
|
||||
return Err(FileError::Parsing(
|
||||
filename.into(),
|
||||
filename,
|
||||
"Kann OSB-Datei nicht lesen".to_string(),
|
||||
));
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ pub fn unzip_osb_using_password(path: &str, dir: &str, password: &str) {
|
||||
};
|
||||
|
||||
let outpath = match file.enclosed_name() {
|
||||
Some(path) => Path::new(dir).join(path.to_owned()),
|
||||
Some(path) => Path::new(dir).join(&path),
|
||||
None => continue,
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user