MCPcopy Create free account
hub / github.com/dirkvranckaert/AndroidDecompiler / getLineEndChange

Method getLineEndChange

astyle/src/astyle_main.cpp:259–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

257// check for a change in line ends
258template<typename T>
259bool ASStreamIterator<T>::getLineEndChange(int lineEndFormat) const
260{
261 assert(lineEndFormat == LINEEND_DEFAULT
262 || lineEndFormat == LINEEND_WINDOWS
263 || lineEndFormat == LINEEND_LINUX
264 || lineEndFormat == LINEEND_MACOLD);
265
266 bool lineEndChange = false;
267 if (lineEndFormat == LINEEND_WINDOWS)
268 lineEndChange = (eolLinux + eolMacOld != 0);
269 else if (lineEndFormat == LINEEND_LINUX)
270 lineEndChange = (eolWindows + eolMacOld != 0);
271 else if (lineEndFormat == LINEEND_MACOLD)
272 lineEndChange = (eolWindows + eolLinux != 0);
273 else
274 {
275 if (eolWindows > 0)
276 lineEndChange = (eolLinux + eolMacOld != 0);
277 else if (eolLinux > 0)
278 lineEndChange = (eolWindows + eolMacOld != 0);
279 else if (eolMacOld > 0)
280 lineEndChange = (eolWindows + eolLinux != 0);
281 }
282 return lineEndChange;
283}
284
285//-----------------------------------------------------------------------------
286// ASConsole class

Callers 1

formatFileMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected