/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "xbt/str.h"
-#include "xbt/dict.h"
+#include <xbt/str.h>
+#include <xbt/dict.h>
+#include <xbt/dynar.h>
+
+#include <simgrid/s4u/host.hpp>
+
#include "simgrid/msg.h"
#include "jmsg_as.h"
#include "jmsg_host.h"
return nullptr;
}
- jtable = env->NewObjectArray((jsize) count, cls, nullptr);
+ jtable = env->NewObjectArray(static_cast<jsize>(count), cls, nullptr);
if (!jtable) {
jxbt_throw_jni(env, "Hosts table allocation failed");
jxbt_throw_notbound(env, "as", jas);
return nullptr;
}
- const char *name = env->GetStringUTFChars((jstring) jname, 0);
+ const char *name = env->GetStringUTFChars(static_cast<jstring>(jname), 0);
const char *property = MSG_environment_as_get_property_value(as, name);
if (!property) {
jobject jproperty = env->NewStringUTF(property);
- env->ReleaseStringUTFChars((jstring) jname, name);
+ env->ReleaseStringUTFChars(static_cast<jstring>(jname), name);
return jproperty;
}
return nullptr;
}
- jtable = env->NewObjectArray((jsize) count, cls, nullptr);
+ jtable = env->NewObjectArray(static_cast<jsize>(count), cls, nullptr);
if (!jtable) {
jxbt_throw_jni(env, "Hosts table allocation failed");
for (index = 0; index < count; index++) {
host = xbt_dynar_get_as(table,index,msg_host_t);
- jhost = (jobject) host->extension(JAVA_HOST_LEVEL);
+ jhost = static_cast<jobject>(host->extension(JAVA_HOST_LEVEL));
if (!jhost) {
jname = env->NewStringUTF(MSG_host_get_name(host));