Prevent empty property names
This commit is contained in:
parent
4811193998
commit
dbc77a6f1c
2 changed files with 8 additions and 18 deletions
|
@ -19,26 +19,12 @@
|
|||
#ifndef DOSBOX_SETUP_H
|
||||
#define DOSBOX_SETUP_H
|
||||
|
||||
#ifndef CH_LIST
|
||||
#define CH_LIST
|
||||
#include <cstdio>
|
||||
#include <list>
|
||||
#endif
|
||||
|
||||
#ifndef CH_VECTOR
|
||||
#define CH_VECTOR
|
||||
#include <vector>
|
||||
#endif
|
||||
|
||||
#ifndef CH_STRING
|
||||
#define CH_STRING
|
||||
#include <string>
|
||||
#endif
|
||||
|
||||
#ifndef CH_CSTDIO
|
||||
#define CH_CSTDIO
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#include <vector>
|
||||
|
||||
#include "support.h"
|
||||
|
||||
class Hex {
|
||||
private:
|
||||
|
@ -123,7 +109,9 @@ public:
|
|||
suggested_values{},
|
||||
default_value(),
|
||||
change(when)
|
||||
{}
|
||||
{
|
||||
assertm(!name.empty(), "Property name can't be empty.");
|
||||
}
|
||||
|
||||
virtual ~Property() = default;
|
||||
|
||||
|
@ -354,4 +342,5 @@ public:
|
|||
/* Returns true if succesful.*/
|
||||
virtual bool Change_Config(Section* /*newconfig*/) {return false;} ;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "dosbox.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
|
Loading…
Add table
Reference in a new issue