Skip to content

Commit dc4d75b

Browse files
[Janitor mode] Fix whitespace
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@24309 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent e79e4e4 commit dc4d75b

File tree

8 files changed

+31
-31
lines changed

8 files changed

+31
-31
lines changed

Compiler/Template/CodegenCpp.tpl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ template simulationWriteOutputHeaderFile(SimCode simCode ,Text& extraFuncs,Text&
357357
match simCode
358358
case SIMCODE(modelInfo=MODELINFO(__),simulationSettingsOpt = SOME(settings as SIMULATION_SETTINGS(__))) then
359359
let n = numProtectedParamVars(modelInfo)
360-
let outputtype = match settings.outputFormat case "mat" then "MatFileWriter" case "buffer" then "BufferReaderWriter" else "TextFileWriter"
360+
let outputtype = match settings.outputFormat case "mat" then "MatFileWriter" case "buffer" then "BufferReaderWriter" else "TextFileWriter"
361361
let numparams = match settings.outputFormat case "csv" then "1" else n
362362
<<
363363
#pragma once
@@ -820,7 +820,7 @@ case SIMCODE(modelInfo = MODELINFO(__)) then
820820
{
821821
_historyImpl->init();
822822

823-
823+
824824
_historyImpl->clear();
825825
}
826826
<%writeoutput(simCode , &extraFuncs , &extraFuncsDecl, extraFuncsNamespace, stateDerVectorName, useFlatArrayNotation)%>
@@ -5909,7 +5909,7 @@ case SIMCODE(modelInfo = MODELINFO(__)) then
59095909
virtual bool isLinear();
59105910
virtual bool isLinearTearing();
59115911
virtual bool isConsistent();
5912-
5912+
59135913
>>
59145914
//void writeOutput(HistoryImplType::value_type_v& v ,vector<string>& head ,const IMixedSystem::OUTPUT command = IMixedSystem::UNDEF_OUTPUT);
59155915
end generateAlgloopMethodDeclarationCode;
@@ -13134,8 +13134,8 @@ case _ then
1313413134
let indexColumn = (jacobianColumn |> (eqs,vars,indxColumn) =>
1313513135
indxColumn
1313613136
;separator="\n")
13137-
13138-
13137+
13138+
1313913139
let jacvals = ( sparsepattern |> (cref,indexes) hasindex index0 =>
1314013140
let jaccol = ( indexes |> i_index hasindex index1 =>
1314113141
(match indexColumn case "1" then '_<%matrixName%>jacobian(<%crefWithoutIndexOperator(cref)%>$pDER<%matrixName%>$indexdiff,0) = _<%matrixName%>jac_y(0);/*test1<%index0%>,<%index1%>*/'
@@ -13154,7 +13154,7 @@ _<%matrixName%>jac_x.clear();
1315413154

1315513155
void <%classname%>Jacobian::get<%matrixName%>Jacobian(SparseMatrix& matrix)
1315613156
{
13157-
13157+
1315813158
<%jacvals%>
1315913159
matrix = _<%matrixName%>jacobian;
1316013160
}

Compiler/Util/StringUtil.mo

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -163,21 +163,21 @@ public function wordWrap
163163
so that words are not split. It also wraps the string at any newline
164164
characters it finds. The function also takes two optional parameters to set
165165
the delimiter and raggedness.
166-
166+
167167
inDelimiter sets the delimiter which is prefixed to all lines except for the
168168
first one. The length of this delimiter is taken into account when wrapping
169169
the string, so it must be shorter than the wrap length. Otherwise the string
170170
will be returned unwrapped. The default is an empty string.
171-
171+
172172
inRaggedness determines the allowed raggedness of the lines, given as a ratio
173173
between 0 and 1. A raggedness of e.g. 0.2 means that each segment may be at
174174
most 20% smaller than the max line length. If a line would be shorter than
175175
this, due to a long word, then the function instead hyphenates the last word.
176176
This is not done according to any grammatical rules, the words are just
177177
broken so that the line is as long as allowed. The default is 0.3.
178-
178+
179179
This function operates on ASCII strings, and does not handle UTF-8 strings
180-
correctly."
180+
correctly."
181181
input String inString;
182182
input Integer inWrapLength;
183183
input String inDelimiter := "";
@@ -212,7 +212,7 @@ algorithm
212212
if next_char <> CHAR_SPACE and next_char <> CHAR_DASH then
213213
// If the next character isn't a space or dash, search backwards for a space.
214214
pos := rfindChar(line, CHAR_SPACE, end_pos, end_pos - gap_size);
215-
215+
216216
if pos <> NO_POS then
217217
// A space was found, break the string here.
218218
str := substring(line, start_pos, pos - 1);
@@ -223,7 +223,7 @@ algorithm
223223

224224
if pos > 1 then
225225
// A dash was found, check that the previous character is alphabetic.
226-
char := stringGetNoBoundsChecking(line, pos - 1);
226+
char := stringGetNoBoundsChecking(line, pos - 1);
227227
pos := if isAlpha(char) and isAlpha(next_char) then pos else NO_POS;
228228
end if;
229229

@@ -249,7 +249,7 @@ algorithm
249249
end_pos := start_pos + line_len;
250250
delim := inDelimiter;
251251
end while;
252-
252+
253253
// Add any remainder of the line to the list.
254254
if start_pos < stringLength(line) then
255255
str := delim + substring(line, start_pos, stringLength(line));
@@ -260,7 +260,7 @@ algorithm
260260
start_pos := 1;
261261
end_pos := line_len;
262262
delim := inDelimiter;
263-
end for;
263+
end for;
264264

265265
outStrings := listReverseInPlace(outStrings);
266266
end wordWrap;

SimulationRuntime/cpp/Core/Solver/SolverDefaultImplementation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void SolverDefaultImplementation::initialize()
105105
// Set current start time to the system
106106
timeevent_system->setTime(_tCurrent);
107107

108-
108+
109109
if(_settings->getGlobalSettings()->getOutputPointType() != EMPTY2 && _settings->getGlobalSettings()->getOutputFormat() != EMPTY)
110110
writeoutput_system->writeOutput(IWriteOutput::HEAD_LINE);
111111

SimulationRuntime/cpp/Core/System/AlgLoopDefaultImplementation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ void AlgLoopDefaultImplementation::initialize()
9292
/// Output routine (to be called by the solver after every successful integration step)
9393
void AlgLoopDefaultImplementation::writeOutput(const OUTPUT command )
9494
{
95-
95+
9696
};
9797

9898
/*

SimulationRuntime/cpp/Include/Core/DataExchange/Policies/BufferReaderWriter.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class BufferReaderWriter : public Writer<dim_1, dim_2, dim_3, dim_4>
8282

8383
void read(ublas::matrix<double>& R)
8484
{
85-
85+
8686
ublas::matrix<double>::size_type m = size();
8787
ublas::matrix<double>::size_type n = _var_outputs.size();
8888
ublas::matrix<double>::size_type i,i2=0,j;
@@ -112,7 +112,7 @@ class BufferReaderWriter : public Writer<dim_1, dim_2, dim_3, dim_4>
112112
cout<<"read from variables buffer faild" << std::endl;
113113
throw ex;
114114
}
115-
115+
116116

117117
}
118118

@@ -170,7 +170,7 @@ class BufferReaderWriter : public Writer<dim_1, dim_2, dim_3, dim_4>
170170
{
171171
_var_outputs =s_list;
172172
}
173-
173+
174174
/*
175175
writes simulation results for a time step
176176
@v_list variables and state vars
@@ -179,8 +179,8 @@ class BufferReaderWriter : public Writer<dim_1, dim_2, dim_3, dim_4>
179179
*/
180180
void write(typename Writer<dim_1, dim_2, dim_3, dim_4>::value_type_v& v_list, typename Writer<dim_1, dim_2, dim_3, dim_4>::value_type_dv& v2_list, double time)
181181
{
182-
183-
182+
183+
184184
try
185185
{
186186
std::pair<std::map<double, unsigned long>::iterator,bool> p;
@@ -194,8 +194,8 @@ class BufferReaderWriter : public Writer<dim_1, dim_2, dim_3, dim_4>
194194
{
195195
_buffer_pos++;
196196
}
197-
198-
197+
198+
199199
_variables_buffer.push_back(v_list);
200200
_derivatives_buffer.push_back(v2_list);
201201
}
@@ -208,7 +208,7 @@ class BufferReaderWriter : public Writer<dim_1, dim_2, dim_3, dim_4>
208208
// textwriter->write(v,v2, time);
209209
}
210210

211-
211+
212212
void getTime(vector<double>& time)
213213
{
214214
try
@@ -249,11 +249,11 @@ class BufferReaderWriter : public Writer<dim_1, dim_2, dim_3, dim_4>
249249
//textwriter->eraseAll();
250250
}
251251

252-
252+
253253
protected:
254254
typedef boost::circular_buffer< typename Writer<dim_1, dim_2, dim_3, dim_4>::value_type_v > buffer_type_v;
255255
typedef boost::circular_buffer< typename Writer<dim_1, dim_2, dim_3, dim_4>::value_type_dv > buffer_type_d;
256-
256+
257257
typedef std::map<double,unsigned long> _time_entries_type;
258258
buffer_type_v _variables_buffer;
259259
buffer_type_d _derivatives_buffer;

SimulationRuntime/cpp/Include/Core/HistoryImpl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class HistoryImpl : public IHistory,
2626
_var_outputs=var_outputs;
2727
}
2828
*/
29-
29+
3030
void init()
3131
{
3232
ResultsPolicy<dim_1,dim_2,dim_3,dim_4>::init(_globalSettings.getOutputPath(), _globalSettings.getResultsFileName());
@@ -95,6 +95,6 @@ class HistoryImpl : public IHistory,
9595
private:
9696
//map of indices of all output variables
9797
//map<unsigned int,string> _var_outputs;
98-
98+
9999
IGlobalSettings& _globalSettings;
100100
};

SimulationRuntime/cpp/Include/Core/Modelica.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ typedef boost::function<void (unordered_map<string,unsigned int>&,unordered_map<
193193
#include <Core/DataExchange/SimDouble.h>
194194
#endif
195195
/*
196-
196+
197197
template class StatArrayDim1<double, 3>;
198198
template class StatArrayDim1<double, 4> ;
199199
template class StatArrayDim2<double, 3,3> ;
@@ -207,5 +207,5 @@ typedef boost::function<void (unordered_map<string,unsigned int>&,unordered_map<
207207
template class boost::unordered_map<bool*, bool>;
208208
template class boost::circular_buffer<double>;
209209
template class map<unsigned int, boost::circular_buffer<double> >;
210-
template class map<unsigned int,string>
210+
template class map<unsigned int,string>
211211
*/

SimulationRuntime/cpp/Include/Core/System/AlgLoopDefaultImplementation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,5 @@ class BOOST_EXTENSION_ALGLOOPDEFAULTIMPL_DECL AlgLoopDefaultImplementation
8888

8989
IAlgLoop::CONSTRTYPE
9090
_constraintType; ///< Typ der Bindungsgleichungen (analog, digital, binär)
91-
91+
9292
};

0 commit comments

Comments
 (0)