Ignore:
Timestamp:
Aug 31, 2021, 1:49:10 AM (3 years ago)
Author:
Jacob Prud'homme <jafprudhomme@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, pthread-emulation, qualifiedEnum
Children:
c166f4e
Parents:
1764a63
git-author:
Jacob Prud'homme <jafprudhomme@…> (08/13/21 17:10:06)
git-committer:
Jacob Prud'homme <jafprudhomme@…> (08/31/21 01:49:10)
Message:

Simplified validation logic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/parseconfig.hfa

    r1764a63 ra3f2a3e  
    1818};
    1919
     20bool null_validator( void * ) { return true; }
     21
    2022static inline void ?{}( config_entry & this ) {}
    2123
     
    2527        this.variable = (void *)&variable;
    2628        this.parse    = (bool (*)(const char *, void *))(bool (*)(const char *, T &))parse;
    27         this.validate = (bool (*)(void *))(bool (*)(T &))0p;
     29        this.validate = null_validation;
    2830}
    2931
     
    4143        this.variable = (void *)&variable;
    4244        this.parse    = (bool (*)(const char *, void *))(bool (*)(const char *, T &))parse;
    43         this.validate = (bool (*)(void *))(bool (*)(T &))0p;
     45        this.validate = null_validation;
    4446}
    4547
Note: See TracChangeset for help on using the changeset viewer.