changeset 293:e1769287ee6a src

removed more silly checks on !this before every public function
author nicodvb
date Sun, 22 Apr 2007 21:29:21 +0000
parents 675f6faff0fd
children 2146ff691bcd
files settings.c
diffstat 1 files changed, 0 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
--- a/settings.c	Sun Apr 22 20:01:44 2007 +0000
+++ b/settings.c	Sun Apr 22 21:29:21 2007 +0000
@@ -41,21 +41,11 @@
 /* Characteristics/setting API calls */
 
 dvdnav_status_t dvdnav_get_region_mask(dvdnav_t *this, int32_t *region) {
-  if(!this || !region) {
-    printerr("Passed a NULL this pointer.");
-    return DVDNAV_STATUS_ERR;
-  }
-
   (*region) = this->vm->state.registers.SPRM[20];
   return DVDNAV_STATUS_OK;
 }
 
 dvdnav_status_t dvdnav_set_region_mask(dvdnav_t *this, int32_t mask) {
-  if(!this) {
-    printerr("Passed a NULL this pointer.");
-    return DVDNAV_STATUS_ERR;
-  }
-
   pthread_mutex_lock(&this->vm_lock);
   this->vm->state.registers.SPRM[20] = (mask & 0xff);
   pthread_mutex_unlock(&this->vm_lock);
@@ -63,31 +53,16 @@
 }
 
 dvdnav_status_t dvdnav_set_readahead_flag(dvdnav_t *this, int32_t use_readahead) {
-  if(!this) {
-    printerr("Passed a NULL this pointer.");
-    return DVDNAV_STATUS_ERR;
-  }
-
   this->use_read_ahead = use_readahead;
   return DVDNAV_STATUS_OK;
 }
 
 dvdnav_status_t dvdnav_get_readahead_flag(dvdnav_t *this, int32_t *flag) {
-  if(!this || !flag) {
-    printerr("Passed a NULL this pointer.");
-    return DVDNAV_STATUS_ERR;
-  }
-
   (*flag) = this->use_read_ahead;
   return DVDNAV_STATUS_OK;
 }
 
 static dvdnav_status_t set_language_register(dvdnav_t *this, char *code, int reg) {
-  if(!this || !code) {
-    printerr("Passed a NULL this pointer.");
-    return DVDNAV_STATUS_ERR;
-  }
-    
   if(!code[0] || !code[1]) {
     printerr("Passed illegal language code.");
     return DVDNAV_STATUS_ERR;
@@ -112,21 +87,11 @@
 }
 
 dvdnav_status_t dvdnav_set_PGC_positioning_flag(dvdnav_t *this, int32_t pgc) {
-  if(!this) {
-    printerr("Passed a NULL this pointer.");
-    return DVDNAV_STATUS_ERR;
-  }
-
   this->pgc_based = pgc;
   return DVDNAV_STATUS_OK;
 }
 
 dvdnav_status_t dvdnav_get_PGC_positioning_flag(dvdnav_t *this, int32_t *flag) {
-  if(!this || !flag) {
-    printerr("Passed a NULL this pointer.");
-    return DVDNAV_STATUS_ERR;
-  }
-
   (*flag) = this->pgc_based;
   return DVDNAV_STATUS_OK;
 }