MCPcopy Create free account
hub / github.com/WinMerge/winmerge / IsTextFileStylePure

Function IsTextFileStylePure

Src/DiffTextBuffer.cpp:40–50  ·  view source on GitHub ↗

* @brief Check if file has only one EOL type. * @param [in] stats File's text stats. * @return true if only one EOL type is found, false otherwise. */

Source from the content-addressed store, hash-verified

38 * @return true if only one EOL type is found, false otherwise.
39 */
40static bool IsTextFileStylePure(const UniMemFile::txtstats & stats)
41{
42 int nType = 0;
43 if (stats.ncrlfs > 0)
44 nType++;
45 if ( stats.ncrs > 0)
46 nType++;
47 if (stats.nlfs > 0)
48 nType++;
49 return (nType <= 1);
50}
51
52/**
53 * @brief Get file's EOL type.

Callers 2

GetTextFileStyleFunction · 0.85
LoadFromFileMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected