File tree 1 file changed +13
-25
lines changed
1 file changed +13
-25
lines changed Original file line number Diff line number Diff line change 18
18
#include " std_expr.h"
19
19
#include " cprover_prefix.h"
20
20
#include " string2int.h"
21
+ #include " string_utils.h"
21
22
22
23
configt config;
23
24
@@ -1286,31 +1287,18 @@ irep_idt configt::this_architecture()
1286
1287
1287
1288
void configt::set_classpath (const std::string &cp)
1288
1289
{
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 ());
1314
1302
}
1315
1303
1316
1304
irep_idt configt::this_operating_system ()
You can’t perform that action at this time.
0 commit comments