File tree 1 file changed +4
-16
lines changed
1 file changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -2668,24 +2668,12 @@ void GUIFormSpecMenu::parseElement(parserData* data, const std::string &element)
2668
2668
if (parseVersionDirect (element))
2669
2669
return ;
2670
2670
2671
- std::vector<std::string> parts = split (element,' [' );
2672
-
2673
- // ugly workaround to keep compatibility
2674
- if (parts.size () > 2 ) {
2675
- if (trim (parts[0 ]) == " image" ) {
2676
- for (unsigned int i=2 ;i< parts.size (); i++) {
2677
- parts[1 ] += " [" + parts[i];
2678
- }
2679
- }
2680
- else { return ; }
2681
- }
2682
-
2683
- if (parts.size () < 2 ) {
2671
+ size_t pos = element.find (' [' );
2672
+ if (pos == std::string::npos)
2684
2673
return ;
2685
- }
2686
2674
2687
- std::string type = trim (parts[ 0 ] );
2688
- std::string description = trim (parts[ 1 ] );
2675
+ std::string type = trim (element. substr ( 0 , pos) );
2676
+ std::string description = element. substr (pos+ 1 );
2689
2677
2690
2678
if (type == " container" ) {
2691
2679
parseContainer (data, description);
You can’t perform that action at this time.
0 commit comments