Running style_format.sh on codebase

This commit is contained in:
Strahinja Val Markovic 2013-10-29 19:13:52 -07:00
parent bff2584ec1
commit 227cceae8a
8 changed files with 75 additions and 72 deletions

View File

@ -93,6 +93,7 @@ std::vector< Diagnostic > ClangCompleter::UpdateTranslationUnit(
// parsed in the TU constructor
if ( !translation_unit_created )
return unit->Reparse( unsaved_files );
return unit->LatestDiagnostics();
}

View File

@ -242,6 +242,7 @@ void TranslationUnit::Reparse( std::vector< CXUnsavedFile > &unsaved_files,
if ( !clang_translation_unit_ )
return;
CXUnsavedFile *unsaved = unsaved_files.size() > 0
? &unsaved_files[ 0 ] : NULL;

View File

@ -71,8 +71,7 @@ const char * const TAG_REGEX =
// When passed a const char* this will create a temporary std::string for
// comparison, but it's fast enough for our use case.
struct StringEqualityComparer :
std::binary_function< std::string, std::string, bool >
{
std::binary_function< std::string, std::string, bool > {
bool operator()( const std::string &a, const std::string &b ) const {
return a == b;
}

View File

@ -40,8 +40,10 @@ namespace {
std::string GetUtf8String( const boost::python::object &string_or_unicode ) {
extract< std::string > to_string( string_or_unicode );
if ( to_string.check() )
return to_string();
return extract< std::string >( str( string_or_unicode ).encode( "utf8" ) );
}