Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 12, 2011, 11:54:35 PM (14 years ago)
Author:
landauf
Message:

added support for boost 1.46 and adjusted code to work with the 3rd version of boost::filesystem

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib/src/libraries/core/command/ArgumentCompletionFunctions.cc

    r7401 r8066  
    5050#if (BOOST_VERSION == 103600)
    5151#  define BOOST_LEAF_FUNCTION filename
     52#  define BOOST_DICTIONARY_ENTRY_NAME string
     53#elif (BOOST_FILESYSTEM_VERSION < 3)
     54#  define BOOST_LEAF_FUNCTION leaf
     55#  define BOOST_DICTIONARY_ENTRY_NAME string
    5256#else
    53 #  define BOOST_LEAF_FUNCTION leaf
     57#  define BOOST_LEAF_FUNCTION path().filename().string
     58#  define BOOST_DICTIONARY_ENTRY_NAME path().string
    5459#endif
    5560
     
    257262                {
    258263                    if (boost::filesystem::is_directory(*file))
    259                         dirlist.push_back(ArgumentCompletionListElement(file->string() + '/', getLowercase(file->string()) + '/', file->BOOST_LEAF_FUNCTION() + '/'));
     264                        dirlist.push_back(ArgumentCompletionListElement(file->BOOST_DICTIONARY_ENTRY_NAME() + '/', getLowercase(file->BOOST_DICTIONARY_ENTRY_NAME()) + '/', file->BOOST_LEAF_FUNCTION() + '/'));
    260265                    else
    261                         filelist.push_back(ArgumentCompletionListElement(file->string(), getLowercase(file->string()), file->BOOST_LEAF_FUNCTION()));
     266                        filelist.push_back(ArgumentCompletionListElement(file->BOOST_DICTIONARY_ENTRY_NAME(), getLowercase(file->BOOST_DICTIONARY_ENTRY_NAME()), file->BOOST_LEAF_FUNCTION()));
    262267                    ++file;
    263268                }
Note: See TracChangeset for help on using the changeset viewer.