OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.6 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../openlibraries/matching-function.patch
  5. # Copyright (C) 2007 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. Original patch from http://openlibraries.cvs.sourceforge.net/openlibraries/openlibraries/src/openobjectlib/sg/appearance.cpp?r1=1.18&r2=1.19&view=patch
  17. but slightly adjusted.
  18. --- a/src/openobjectlib/sg/appearance.cpp 2007/05/17 18:48:19 1.18
  19. +++ b/src/openobjectlib/sg/appearance.cpp 2007/07/20 10:16:31 1.19
  20. @@ -53,12 +53,15 @@
  21. opl::wstring filename_;
  22. };
  23. -
  24. +
  25. bool find_url_availability( const opl::m_url& m, fs::path& p )
  26. {
  27. typedef opl::m_url::const_iterator const_iterator;
  28. -
  29. - const_iterator I = std::find_if( m.begin( ), m.end( ), fs::exists );
  30. +
  31. + //M> for some reason it MSVC8 doesnt like this call, and needs help with the template types
  32. + typedef bool (*fileSystemFunc)( const boost::filesystem::path & ph );
  33. +
  34. + const_iterator I = std::find_if<opl::m_url::const_iterator, fileSystemFunc>(m.begin() , m.end(), fs::exists );
  35. if( I != m.end( ) )
  36. {
  37. p = *I;