Skip to content

Commit 4c20b2c

Browse files
committed
ascii art optional/mandatory
These have the best error checking and support for extended features.
1 parent 61bdc3e commit 4c20b2c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/ascii_art.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
#include <string>
44

5-
#include "assign.h"
65
#include "catacharset.h"
76
#include "debug.h"
87
#include "generic_factory.h"
@@ -34,9 +33,7 @@ void ascii_art::load_ascii_art( const JsonObject &jo, const std::string &src )
3433

3534
void ascii_art::load( const JsonObject &jo, std::string_view )
3635
{
37-
assign( jo, "id", id );
38-
39-
assign( jo, "picture", picture );
36+
mandatory( jo, was_loaded, "picture", picture );
4037
for( std::string &line : picture ) {
4138
if( utf8_width( remove_color_tags( line ) ) > ascii_art_width ) {
4239
line = trim_by_length( line, ascii_art_width );

0 commit comments

Comments
 (0)