diff --git a/src/base_64.cpp b/src/base_64.cpp index 8549654..212ddf8 100644 --- a/src/base_64.cpp +++ b/src/base_64.cpp @@ -126,7 +126,7 @@ inline std::string raster_to_string(std::vector raster_, int w, in } std::vector buffer; - png_set_rows(png, info, &rows[0]); + png_set_rows(png, info, rows.data()); png_set_write_fn(png, &buffer, png_memory_write, NULL); png_write_png(png, info, PNG_TRANSFORM_IDENTITY, NULL); png_destroy_write_struct(&png, &info); diff --git a/src/unigd_external.cpp b/src/unigd_external.cpp index 27e1813..c2b3f40 100644 --- a/src/unigd_external.cpp +++ b/src/unigd_external.cpp @@ -13,7 +13,7 @@ using unigd_handle_t = unigd_handle; unigd_find_results find_results::c_repr() { - return {state, static_cast(ids.size()), &ids[0]}; + return {state, static_cast(ids.size()), ids.data()}; } int api_test_fun() { return 7; } @@ -163,7 +163,7 @@ UNIGD_RENDERERS_HANDLE api_renderers(unigd_renderers_list *renderer) re->emplace_back(it.second.info); } - *renderer = {&((*re)[0]), re->size()}; + *renderer = {(*re).data(), re->size()}; return re; }