diff --git a/openbr/openbr.cpp b/openbr/openbr.cpp index 2c3bd79..e1d67fe 100644 --- a/openbr/openbr.cpp +++ b/openbr/openbr.cpp @@ -361,7 +361,7 @@ bool br_img_is_empty(br_template tmpl) return t->m().empty(); } -int br_get_filename(br_template tmpl, char * buffer, int buffer_length) +int br_get_filename(char * buffer, int buffer_length, br_template tmpl) { return partialCopy(reinterpret_cast(tmpl)->file.name, buffer, buffer_length); } @@ -372,7 +372,7 @@ void br_set_filename(br_template tmpl, const char *filename) t->file.name = filename; } -int br_get_metadata_string(br_template tmpl, const char *key, char * buffer, int buffer_length) +int br_get_metadata_string(char * buffer, int buffer_length, br_template tmpl, const char *key) { Template *t = reinterpret_cast(tmpl); QVariant qvar = t->file.value(key); diff --git a/openbr/openbr.h b/openbr/openbr.h index 4438b27..f2cce16 100644 --- a/openbr/openbr.h +++ b/openbr/openbr.h @@ -512,7 +512,7 @@ BR_EXPORT bool br_img_is_empty(br_template tmpl); * \brief Get the filename for a br::Template * \note \ref input_string_buffer */ -BR_EXPORT int br_get_filename(br_template tmpl, char * buffer, int buffer_length); +BR_EXPORT int br_get_filename(char * buffer, int buffer_length, br_template tmpl); /*! * \brief Set the filename for a br::Template. */ @@ -521,7 +521,7 @@ BR_EXPORT void br_set_filename(br_template tmpl, const char *filename); * \brief Get metadata as a string for the given key in the given template. * \note \ref input_string_buffer */ -BR_EXPORT int br_get_metadata_string(br_template, const char *key, char * buffer, int buffer_length); +BR_EXPORT int br_get_metadata_string(char * buffer, int buffer_length, br_template tmpl, const char *key); /*! * \brief Enroll a br::Template from the C API! Returns a pointer to a br::TemplateList * \param tmpl Pointer to a br::Template.