From 03e51ab4708f03799b76e1f26dc73f3d461ee14f Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Sat, 29 Aug 2015 20:00:26 +0000 Subject: [PATCH] #640 and # 751. Fixing linux build-breaker. --- samples/exiv2json.cpp | 4 +--- src/xmp.cpp | 5 ++-- test/data/xmpparser-test.out | 44 ++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 5 deletions(-) diff --git a/samples/exiv2json.cpp b/samples/exiv2json.cpp index dcc7a94f..c107ef66 100644 --- a/samples/exiv2json.cpp +++ b/samples/exiv2json.cpp @@ -317,9 +317,7 @@ try { } // get the namespace dictionary from XMP - typedef std::map dict_t; - typedef std::map::const_iterator dict_i; - dict_t nsDict; + std::map nsDict; Exiv2::XmpParser::getRegisteredNamespaces(nsDict); // create and populate a Jzon::Object for the namespaces diff --git a/src/xmp.cpp b/src/xmp.cpp index 481bb0fa..bae3bbe7 100644 --- a/src/xmp.cpp +++ b/src/xmp.cpp @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software + * along with this f; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA. */ /* @@ -446,7 +446,8 @@ namespace Exiv2 { // pop trailing ':' on a namespace if ( bNS ) { - if ( out[out.length()-1] == ':' ) out.pop_back(); + std::size_t length = out.length(); + if ( out[length-1] == ':' ) out = out.substr(0,length-1); } if ( bURI || bNS ) { diff --git a/test/data/xmpparser-test.out b/test/data/xmpparser-test.out index 088c2fd7..26ccff58 100644 --- a/test/data/xmpparser-test.out +++ b/test/data/xmpparser-test.out @@ -36,6 +36,50 @@ Xmp.exif.NativeDigest XmpText 414 36864,40960,40961,37 < Blue Square Test File - .jpg 36a36 > Blue Square Test File - .jpg +67,87c67,87 +< +< +< +< +< +< +< +< +< +< +< +< +< +< +< +< +< +< +< +< +< +--- +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> +> -----> Decoding XMP data read from StaffPhotographer-Example.xmp <----- Xmp.iptc.IntellectualGenre XmpText 7 Profile Xmp.iptc.Location XmpText 17 Moore family farm