1
0
Fork 0

Prevent empty property names

This commit is contained in:
Patryk Obara 2020-03-26 20:30:26 +01:00 committed by Patryk Obara
parent 4811193998
commit dbc77a6f1c
2 changed files with 8 additions and 18 deletions

View file

@ -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

View file

@ -22,6 +22,7 @@
#include "dosbox.h"
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <ctype.h>
#include <string.h>