@@ -155,26 +155,15 @@ static void ConstructNodeData(const CpuProfileNode *node, int id, int parentId,
155155
156156 result << " {" << " \" functionName\" :\" " << strFunction << " \" ," ;
157157 result << " \" url\" :\" " << strScript << " \" ," ;
158- #if defined(_WINDOWS)
159- result << " \" lineNumber\" :" << std::to_string (line) << " ," ;
160- result << " \" hitCount\" :" << std::to_string (selfSamples) << " ," ;
161- result << " \" id\" :" << std::to_string (id) << " ," ;
162- #else
163- result << " \" lineNumber\" :" << line << " ," ;
158+ result << " \" lineNumber\" :" << line << " ," ;
164159 result << " \" hitCount\" :" << selfSamples << " ," ;
165160 result << " \" id\" :" << id << " ," ;
166- #endif
167161 result << " \" children\" :[" ;
168162 }
169163
170164 else {
171- #if defined(_WINDOWS)
172- result << " NodeProfData,Node," << std::to_string (id) << ' ,' << std::to_string (parentId) << ' ,' ;
173- result << script << ' ,' << function << ' ,' << std::to_string (line) << ' ,' << std::to_string (selfSamples) << ' \n ' ;
174- #else
175- result << " NodeProfData,Node," << id << ' ,' << parentId << ' ,' ;
176- result << script << ' ,' << function << ' ,' << line << ' ,' << selfSamples << ' \n ' ;
177- #endif
165+ result << " NodeProfData,Node," << id << ' ,' << parentId << ' ,' ;
166+ result << script << ' ,' << function << ' ,' << line << ' ,' << selfSamples << ' \n ' ;
178167 }
179168
180169 // clean up
@@ -206,18 +195,10 @@ static char * ConstructData(const CpuProfile *profile) {
206195
207196 std::stringstream result;
208197 if (jsonEnabled){
209- #if defined(_WINDOWS)
210- result << " {\" date\" :" << std::to_string (GetRealTime ()) << " ," ;
211- #else
212198 result << " {\" date\" :" << GetRealTime () << " ," ;
213- #endif
214199 result << " \" head\" :" ;
215200 }
216- #if defined(_WINDOWS)
217- else result << " NodeProfData,Start," << std::to_string (GetRealTime ()) << ' \n ' ;
218- #else
219- else result << " NodeProfData,Start," << GetRealTime () << ' \n ' ;
220- #endif
201+ else result << " NodeProfData,Start," << GetRealTime () << ' \n ' ;
221202 visit (topRoot, ConstructNodeData, 0 , result);
222203 if (jsonEnabled){
223204 result << " }" ;
0 commit comments