File tree Expand file tree Collapse file tree 1 file changed +13
-25
lines changed Expand file tree Collapse file tree 1 file changed +13
-25
lines changed Original file line number Diff line number Diff line change 1818#include " std_expr.h"
1919#include " cprover_prefix.h"
2020#include " string2int.h"
21+ #include " string_utils.h"
2122
2223configt config;
2324
@@ -1286,31 +1287,18 @@ irep_idt configt::this_architecture()
12861287
12871288void configt::set_classpath (const std::string &cp)
12881289{
1289- std::string current;
1290- for (std::size_t pos=0 ; pos<cp.size (); pos++)
1291- {
1292- // These are separated by colons on Unix, and semicolons on
1293- // Windows.
1294- #ifdef _WIN32
1295- const char cp_separator=' ;' ;
1296- #else
1297- const char cp_separator=' :' ;
1298- #endif
1299-
1300- if (cp[pos]==cp_separator)
1301- {
1302- if (!current.empty ())
1303- {
1304- java.classpath .push_back (current);
1305- current.clear ();
1306- }
1307- }
1308- else
1309- current+=cp[pos];
1310- }
1311-
1312- if (!current.empty ())
1313- java.classpath .push_back (current);
1290+ // These are separated by colons on Unix, and semicolons on
1291+ // Windows.
1292+ #ifdef _WIN32
1293+ const char cp_separator = ' ;' ;
1294+ #else
1295+ const char cp_separator = ' :' ;
1296+ #endif
1297+
1298+ std::vector<std::string> class_path;
1299+ split_string (cp, cp_separator, class_path);
1300+ java.classpath .insert (
1301+ java.classpath .end (), class_path.begin (), class_path.end ());
13141302}
13151303
13161304irep_idt configt::this_operating_system ()
You can’t perform that action at this time.
0 commit comments