Create get_byte_length method
This commit is contained in:
parent
cb08e8c7dd
commit
fe9ee68385
|
@ -82,6 +82,7 @@ public:
|
||||||
|
|
||||||
void add_path( const Glib::ustring & path, bool clear_paths = false ) ;
|
void add_path( const Glib::ustring & path, bool clear_paths = false ) ;
|
||||||
void add_paths( const std::vector<Glib::ustring> & paths, bool clear_paths = false ) ;
|
void add_paths( const std::vector<Glib::ustring> & paths, bool clear_paths = false ) ;
|
||||||
|
Byte_Value get_byte_length() const ;
|
||||||
Sector get_length() const ;
|
Sector get_length() const ;
|
||||||
Glib::ustring get_path() const ;
|
Glib::ustring get_path() const ;
|
||||||
std::vector<Glib::ustring> get_paths() const ;
|
std::vector<Glib::ustring> get_paths() const ;
|
||||||
|
|
|
@ -154,6 +154,14 @@ void Partition::add_paths( const std::vector<Glib::ustring> & paths, bool clear_
|
||||||
sort_paths_and_remove_duplicates() ;
|
sort_paths_and_remove_duplicates() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Byte_Value Partition::get_byte_length() const
|
||||||
|
{
|
||||||
|
if ( get_length() >= 0 )
|
||||||
|
return get_length() * sector_size ;
|
||||||
|
else
|
||||||
|
return -1 ;
|
||||||
|
}
|
||||||
|
|
||||||
Sector Partition::get_length() const
|
Sector Partition::get_length() const
|
||||||
{
|
{
|
||||||
if ( sector_start >= 0 && sector_end >= 0 )
|
if ( sector_start >= 0 && sector_end >= 0 )
|
||||||
|
|
Loading…
Reference in New Issue