Skip to content

Commit

Permalink
rm warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
LaihoE committed Apr 20, 2024
1 parent cb8f1d9 commit ea93d11
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
2 changes: 0 additions & 2 deletions src/parser/src/parse_demo.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::time::Instant;

use crate::first_pass::parser::FirstPassOutput;
use crate::first_pass::parser_settings::check_multithreadability;
use crate::first_pass::parser_settings::{FirstPassParser, ParserInputs};
Expand Down
17 changes: 9 additions & 8 deletions src/parser/src/second_pass/entities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ impl<'a> SecondPassParser<'a> {
if bitreader.bits_left < HUFFMAN_CODE_MAXLEN {
bitreader.refill();
}

let peeked_bits = bitreader.peek(HUFFMAN_CODE_MAXLEN);
let (symbol, code_len) = self.huffman_lookup_table[peeked_bits as usize];
bitreader.consume(code_len as u32);
Expand Down Expand Up @@ -301,14 +302,14 @@ impl<'a> SecondPassParser<'a> {
pub fn debug_inspect(
_result: &Variant,
field: &Field,
tick: i32,
_tick: i32,
field_info: Option<FieldInfo>,
path: &FieldPath,
is_fullpacket: bool,
is_baseline: bool,
cls: &Class,
cls_id: &u32,
entity_id: &i32,
_path: &FieldPath,
_is_fullpacket: bool,
_is_baseline: bool,
_cls: &Class,
_cls_id: &u32,
_entity_id: &i32,
) {
if let Field::Value(_v) = field {
if _v.full_name.contains("Custom") {
Expand Down Expand Up @@ -584,7 +585,7 @@ impl<'a> SecondPassParser<'a> {
&mut self,
bitreader: &mut Bitreader,
entity_id: &i32,
events_to_emit: &mut Vec<GameEventInfo>,
_events_to_emit: &mut Vec<GameEventInfo>,
) -> Result<(), DemoParserError> {
let cls_id: u32 = bitreader.read_nbits(8)?;
// Both of these are not used. Don't think they are interesting for the parser
Expand Down
4 changes: 0 additions & 4 deletions src/parser/src/second_pass/game_events.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
use std::sync::Arc;

use super::entities::RoundEnd;
use crate::first_pass::prop_controller::PropInfo;
use crate::first_pass::prop_controller::IS_ALIVE_ID;
use crate::first_pass::prop_controller::ITEM_PURCHASE_COST;
use crate::first_pass::prop_controller::ITEM_PURCHASE_COUNT;
use crate::first_pass::prop_controller::ITEM_PURCHASE_DEF_IDX;
use crate::first_pass::prop_controller::ITEM_PURCHASE_NEW_DEF_IDX;
use crate::first_pass::prop_controller::WEAPON_FLOAT;
use crate::first_pass::prop_controller::WEAPON_PAINT_SEED;
use crate::first_pass::prop_controller::WEAPON_STICKERS_ID;
use crate::first_pass::read_bits::DemoParserError;
use crate::first_pass::stringtables::UserInfo;
use crate::maps::ROUND_WIN_REASON;
Expand Down
10 changes: 9 additions & 1 deletion src/parser/src/second_pass/voice_data.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
// there has to be a better way to disable multiple :D
#[cfg(feature = "voice")]
use crate::first_pass::read_bits::DemoParserError;
#[cfg(feature = "voice")]
use ahash::AHashMap;
#[cfg(feature = "voice")]
use csgoproto::netmessages::CSVCMsg_VoiceData;
#[cfg(feature = "voice")]
use opus::Decoder;
#[cfg(feature = "voice")]
use rayon::iter::IntoParallelRefIterator;
#[cfg(feature = "voice")]
use rayon::iter::ParallelIterator;
use std::i16;

#[cfg(feature = "voice")]
#[derive(Debug)]
struct VoicePacket {
pub length: u16,
pub voice_type: u8,
}
#[cfg(feature = "voice")]
const FRAME_SIZE: usize = 480;
#[cfg(feature = "voice")]
const AVG_BYTES_PER_PACKET: usize = 1600;

#[cfg(feature = "voice")]
Expand Down

0 comments on commit ea93d11

Please sign in to comment.