Skip Navigation

Description, because "alt text" can't show it well:

 cpp
    
            {
                emit differentFiles (ckFile.absoluteFilePath(),
                    otherFile.absoluteFilePath(),
                    FileCompareWorker::FileComparisonParams{FileComparisonParams::FileNameMatch,
                        (ckFile.size() > otherFile.size()) ? FileComparisonParams::File1IsLarger
                            : FileComparisonParams::File2IsLarger});
            }

  

After Alignment

 cpp
    
            {
                emit differentFiles (ckFile.absoluteFilePath(),
                    otherFile.absoluteFilePath(),
                    FileCompareWorker::FileComparisonParams{FileComparisonParams::FileNameMatch,
                        (ckFile.size() > otherFile.size()) ? FileComparisonParams::File1IsLarger
                                                           : FileComparisonParams::File2IsLarger});
            }

  
15 comments
  • I find both horrifying.

    This is how I’d want to read it:

     
        
                {
                    emit differentFiles(
                        ckFile.absoluteFilePath(),
                        otherFile.absoluteFilePath(),
                        FileCompareWorker::FileComparisonParams{
                            FileComparisonParams::FileNameMatch,
                            (ckFile.size() > otherFile.size())
                                ? FileComparisonParams::File1IsLarger
                                : FileComparisonParams::File2IsLarger
                        }
                    );
                }
    
      
  • is it my lack of go skills, or they're both really awful to read? It takes me multiple seconds to match the first parenthesis opened and it seems the code could really use a refactoring, but both formatting options suck.

15 comments