Code style fixes

This commit is contained in:
Strahinja Val Markovic 2013-04-29 19:24:28 -07:00
parent f25bf2f6c8
commit 7f676f85ae
4 changed files with 32 additions and 28 deletions

View File

@ -272,9 +272,11 @@ Location ClangCompleter::GetDeclarationLocation(
filename, filename,
unsaved_files, unsaved_files,
flags ); flags );
if (!unit) {
if ( !unit ) {
return Location(); return Location();
} }
return unit->GetDeclarationLocation( line, column, unsaved_files ); return unit->GetDeclarationLocation( line, column, unsaved_files );
} }
@ -289,9 +291,11 @@ Location ClangCompleter::GetDefinitionLocation(
filename, filename,
unsaved_files, unsaved_files,
flags ); flags );
if (!unit) {
if ( !unit ) {
return Location(); return Location();
} }
return unit->GetDefinitionLocation( line, column, unsaved_files ); return unit->GetDefinitionLocation( line, column, unsaved_files );
} }

View File

@ -27,8 +27,8 @@ TEST( CandidateRepositoryTest, EmptyCandidatesForUnicode ) {
inputs.push_back( "fooδιακριτικός" ); inputs.push_back( "fooδιακριτικός" );
inputs.push_back( "fooδιακός" ); inputs.push_back( "fooδιακός" );
CandidateRepository& repo = CandidateRepository::Instance(); CandidateRepository &repo = CandidateRepository::Instance();
std::vector< const Candidate* > candidates = std::vector< const Candidate * > candidates =
repo.GetCandidatesForStrings( inputs ); repo.GetCandidatesForStrings( inputs );
EXPECT_EQ( "", candidates[ 0 ]->Text() ); EXPECT_EQ( "", candidates[ 0 ]->Text() );
@ -40,8 +40,8 @@ TEST( CandidateRepositoryTest, EmptyCandidatesForNonPrintable ) {
std::vector< std::string > inputs; std::vector< std::string > inputs;
inputs.push_back( "\x01\x05\x0a\x15" ); inputs.push_back( "\x01\x05\x0a\x15" );
CandidateRepository& repo = CandidateRepository::Instance(); CandidateRepository &repo = CandidateRepository::Instance();
std::vector< const Candidate* > candidates = std::vector< const Candidate * > candidates =
repo.GetCandidatesForStrings( inputs ); repo.GetCandidatesForStrings( inputs );
EXPECT_EQ( "", candidates[ 0 ]->Text() ); EXPECT_EQ( "", candidates[ 0 ]->Text() );