[Insight-users] itkMetaDataDictionary: HasKey method could be const
Luis Ibanez
luis.ibanez at kitware.com
Mon Dec 22 09:19:46 EST 2008
Hi Emmanuel,
Thanks for pointing this out.
Your patch has been committed to the CVS repository.
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/Common/itkMetaDataDictionary.h?root=Insight&r1=1.20&r2=1.21&sortby=date
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/Common/itkMetaDataDictionary.cxx?root=Insight&r1=1.16&r2=1.17&sortby=date
Please let us know if you find any other issue.
Thanks
Luis
----------------------------
Emmanuel Christophe wrote:
> Hi,
>
> Attached is a short patch for the itkMetaDataDictionary: the HasKey
> method can be declared as const.
>
> Best regards,
> Emmanuel
>
>
> ------------------------------------------------------------------------
>
> diff -r bc516f95b19c -r d2abed0e5bb4 Code/Common/itkMetaDataDictionary.cxx
> --- a/Code/Common/itkMetaDataDictionary.cxx Mon Dec 22 10:48:07 2008 +0800
> +++ b/Code/Common/itkMetaDataDictionary.cxx Mon Dec 22 09:38:38 2008 +0800
> @@ -80,7 +80,7 @@
>
> bool
> MetaDataDictionary
> -::HasKey(const std::string &key) const
> +::HasKey(const std::string &key)
> {
> return m_Dictionary->find(key) != m_Dictionary->end();
> }
> diff -r bc516f95b19c -r d2abed0e5bb4 Code/Common/itkMetaDataDictionary.h
> --- a/Code/Common/itkMetaDataDictionary.h Mon Dec 22 10:48:07 2008 +0800
> +++ b/Code/Common/itkMetaDataDictionary.h Mon Dec 22 09:38:38 2008 +0800
> @@ -73,7 +73,7 @@
> // API. The implementation will be in the DLL.
> MetaDataObjectBase::Pointer &operator [](const std::string &);
> const MetaDataObjectBase * operator [](const std::string &) const;
> - bool HasKey (const std::string &) const;
> + bool HasKey (const std::string &);
>
>
> /** \warning the following functions SHOULD NOT be used with
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list