@@ -480,12 +480,7 @@ impl NodeTable {
480480 /// # }
481481 /// ```
482482 pub fn time < N : Into < NodeId > + Copy > ( & self , row : N ) -> Option < Time > {
483- assert ! ( self . num_rows( ) == 0 || !self . as_ref( ) . time. is_null( ) ) ;
484- // SAFETY: either the column is empty or the pointer is not null,
485- // in which case the correct lengths are from the low-level objects
486- unsafe {
487- sys:: tsk_column_access :: < Time , _ , _ , _ > ( row. into ( ) , self . as_ref ( ) . time , self . num_rows ( ) )
488- }
483+ self . table_ . time ( row. into ( ) )
489484 }
490485
491486 /// Return the ``flags`` value from row ``row`` of the table.
@@ -510,16 +505,7 @@ impl NodeTable {
510505 /// # }
511506 /// ```
512507 pub fn flags < N : Into < NodeId > + Copy > ( & self , row : N ) -> Option < NodeFlags > {
513- assert ! ( self . num_rows( ) == 0 || !self . as_ref( ) . flags. is_null( ) ) ;
514- // SAFETY: either the column is empty or the pointer is not null,
515- // in which case the correct lengths are from the low-level objects
516- unsafe {
517- sys:: tsk_column_access :: < NodeFlags , _ , _ , _ > (
518- row. into ( ) ,
519- self . as_ref ( ) . flags ,
520- self . num_rows ( ) ,
521- )
522- }
508+ self . table_ . flags ( row. into ( ) )
523509 }
524510
525511 /// Return the ``population`` value from row ``row`` of the table.
@@ -544,16 +530,7 @@ impl NodeTable {
544530 /// * `Some(population)` if `row` is valid.
545531 /// * `None` otherwise.
546532 pub fn population < N : Into < NodeId > + Copy > ( & self , row : N ) -> Option < PopulationId > {
547- assert ! ( self . num_rows( ) == 0 || !self . as_ref( ) . population. is_null( ) ) ;
548- // SAFETY: either the column is empty or the pointer is not null,
549- // in which case the correct lengths are from the low-level objects
550- unsafe {
551- sys:: tsk_column_access :: < PopulationId , _ , _ , _ > (
552- row. into ( ) ,
553- self . as_ref ( ) . population ,
554- self . num_rows ( ) ,
555- )
556- }
533+ self . table_ . population ( row. into ( ) )
557534 }
558535
559536 /// Return the ``population`` value from row ``row`` of the table.
@@ -592,16 +569,7 @@ impl NodeTable {
592569 /// * `Some(individual)` if `row` is valid.
593570 /// * `None` otherwise.
594571 pub fn individual < N : Into < NodeId > + Copy > ( & self , row : N ) -> Option < IndividualId > {
595- assert ! ( self . num_rows( ) == 0 || !self . as_ref( ) . individual. is_null( ) ) ;
596- // SAFETY: either the column is empty or the pointer is not null,
597- // in which case the correct lengths are from the low-level objects
598- unsafe {
599- sys:: tsk_column_access :: < IndividualId , _ , _ , _ > (
600- row. into ( ) ,
601- self . as_ref ( ) . individual ,
602- self . num_rows ( ) ,
603- )
604- }
572+ self . table_ . individual ( row. into ( ) )
605573 }
606574
607575 /// Retrieve decoded metadata for a `row`.
0 commit comments