Verified Commit cd5df869 authored by ANA MANZANO RODRIGUEZ's avatar ANA MANZANO RODRIGUEZ Committed by Alberto Miranda
Browse files

Code cleanup

parent bc26d35d
Loading
Loading
Loading
Loading
+0 −1
Changes for examples/c/ADM_deploy_adhoc_storage.c: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -71,7 +71,6 @@ main(int argc, char* argv[]) {
    const char* user_id = "adhoc_storage_42";

    ADM_storage_t adhoc_storage;

    ret = ADM_register_adhoc_storage(server, job, user_id, ctx, &adhoc_storage);

    if(ret != ADM_SUCCESS) {
+0 −2
Changes for examples/c/ADM_register_adhoc_storage.c: 0 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -71,10 +71,8 @@ main(int argc, char* argv[]) {
    const char* user_id = "adhoc_storage_42";

    ADM_storage_t adhoc_storage;

    ret = ADM_register_adhoc_storage(server, job, user_id, ctx, &adhoc_storage);


    if(ret != ADM_SUCCESS) {
        fprintf(stdout,
                "ADM_register_adhoc_storage() remote procedure not completed "
+1 −1
Changes for examples/cxx/ADM_register_adhoc_storage.cpp: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ main(int argc, char* argv[]) {
    ADM_return_t ret = ADM_SUCCESS;

    try {
        [[maybe_unused]] const auto job = admire::register_job(server, reqs);
        const auto job = admire::register_job(server, reqs);
        const auto adhoc_storage = admire::register_adhoc_storage(
                server, job, user_id, adhoc_storage_ctx);
    } catch(const std::exception& e) {
+0 −1
Changes for src/common/api/admire_types.hpp: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -245,7 +245,6 @@ struct storage {
    type
    type() const;


    virtual std::shared_ptr<ctx>
    context() const = 0;

+2 −3
Changes for src/common/api/convert.cpp: 2 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -71,10 +71,9 @@ convert(const admire::adhoc_storage& st) {
    auto managed_ctx =
            convert(*std::static_pointer_cast<admire::adhoc_storage::ctx>(
                    st.context()));

    ADM_storage_t c_st = ADM_storage_create(
            (std::to_string(st.id())).c_str(), static_cast<ADM_storage_type_t>(st.type()),
            managed_ctx.get());
            (std::to_string(st.id())).c_str(),
            static_cast<ADM_storage_type_t>(st.type()), managed_ctx.get());

    return managed_ctype<ADM_storage_t>{c_st, std::move(managed_ctx)};
}
Loading