MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / getLineEndChange

Method getLineEndChange

other_src/astyle/src/astyle_main.cpp:260–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

formatFileMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected