1
0
Fork 0
mirror of https://codeberg.org/demostf/parser.git synced 2026-06-04 02:24:12 +02:00

refcount propnames

This commit is contained in:
Robin Appelman 2019-08-11 14:42:01 +02:00
commit e54f0f35fc
2 changed files with 34 additions and 5 deletions

View file

@ -1,6 +1,6 @@
use bitstream_reader::{BitRead, LittleEndian};
use crate::demo::sendprop::{SendPropDefinition, SendPropFlag, SendPropType};
use crate::demo::sendprop::{SendPropDefinition, SendPropFlag, SendPropName, SendPropType};
use crate::{Parse, ParseError, ParserState, ReadResult, Result, Stream};
use serde::{Deserialize, Serialize};
use std::cell::{Cell, RefCell};
@ -166,12 +166,12 @@ impl ParseSendTable {
#[derive(Clone)]
struct Exclude<'a> {
table: &'a SendTableName,
prop: &'a str,
prop: &'a SendPropName,
}
impl<'a> Exclude<'a> {
pub fn matches(&self, prop: &SendPropDefinition) -> bool {
self.table == &prop.owner_table && self.prop == prop.name
self.table == &prop.owner_table && *self.prop == prop.name
}
}