MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / OutputMultiLineText

Method OutputMultiLineText

3rdparty/simpleini/include/SimpleIni.h:2731–2757  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2729
2730template<class SI_CHAR, class SI_STRLESS, class SI_CONVERTER>
2731bool
2732CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::OutputMultiLineText(
2733 OutputWriter & a_oOutput,
2734 Converter & a_oConverter,
2735 const SI_CHAR * a_pText
2736 ) const
2737{
2738 const SI_CHAR * pEndOfLine;
2739 SI_CHAR cEndOfLineChar = *a_pText;
2740 while (cEndOfLineChar) {
2741 // find the end of this line
2742 pEndOfLine = a_pText;
2743 for (; *pEndOfLine && *pEndOfLine != '\n'; ++pEndOfLine) /*loop*/ ;
2744 cEndOfLineChar = *pEndOfLine;
2745
2746 // temporarily null terminate, convert and output the line
2747 *const_cast<SI_CHAR*>(pEndOfLine) = 0;
2748 if (!a_oConverter.ConvertToStore(a_pText)) {
2749 return false;
2750 }
2751 *const_cast<SI_CHAR*>(pEndOfLine) = cEndOfLineChar;
2752 a_pText += (pEndOfLine - a_pText) + 1;
2753 a_oOutput.Write(a_oConverter.Data());
2754 a_oOutput.Write(SI_NEWLINE_A);
2755 }
2756 return true;
2757}
2758
2759template<class SI_CHAR, class SI_STRLESS, class SI_CONVERTER>
2760bool

Callers

nothing calls this directly

Calls 3

DataMethod · 0.80
ConvertToStoreMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected