Skip to content

Commit

Permalink
[Janitor mode] Fix whitespace
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@21863 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
OpenModelica-Hudson committed Aug 13, 2014
1 parent 0fbe956 commit dad8e94
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
20 changes: 10 additions & 10 deletions Compiler/Template/CodegenCpp.tpl
Expand Up @@ -3020,12 +3020,12 @@ case var as VARIABLE(__) then
/* previous multi_array
if instDims then 'multi_array<<%expTypeShort(var.ty)%>,<%listLength(instDims)%>> ' else expTypeFlag(var.ty, 6)
*/

/*Always use BaseArray as function array argument types */
if instDims then 'BaseArray<<%expTypeShort(ty)%>>&' else expTypeFlag(var.ty, 8)
/* uses StatArrray if possible else Dynarray as function array argument types
let &varDecls = buffer ""
let &varInits = buffer ""
/* uses StatArrray if possible else Dynarray as function array argument types
let &varDecls = buffer ""
let &varInits = buffer ""
let testinstDimsInit = (instDims |> exp => testDaeDimensionExp(exp);separator="")

match testinstDimsInit
Expand All @@ -3047,17 +3047,17 @@ case var as VARIABLE(__) then
/* previous multi_array
if instDims then 'multi_array_ref<<%expTypeShort(var.ty)%>,<%listLength(instDims)%>> ' else expTypeFlag(var.ty, 5)
*/


/*uses StatArrray if possible else Dynarray as function array argument types */
let &varDecls = buffer ""
let &varInits = buffer ""
let &varDecls = buffer ""
let &varInits = buffer ""
let DimsTest = (instDims |> exp => daeDimensionExp(exp);separator="")
let instDimsInit = (instDims |> exp => daeExp(exp, contextFunction, &varInits , &varDecls,simCode,useFlatArrayNotation);separator=",")
match DimsTest
case "" then if instDims then 'StatArrayDim<%listLength(instDims)%><<%expTypeShort(var.ty)%>, <%instDimsInit%>>& ' else expTypeFlag(var.ty, 5)
else if instDims then 'DynArrayDim<%listLength(instDims)%><<%expTypeShort(var.ty)%>>&' else expTypeFlag(var.ty, 5)

end varType2;

template varType3(Variable var,SimCode simCode)
Expand Down Expand Up @@ -8393,7 +8393,7 @@ template daeExpMatrixRow(list<Exp> row,
let expVar = daeExp(e, context, &preExp , &varDecls ,simCode,useFlatArrayNotation)
'<%expVar%>'
;separator=",")
varLstStr
varLstStr
end daeExpMatrixRow;
/////////////////////////////////////////////////NonCED functions

Expand Down
10 changes: 5 additions & 5 deletions SimulationRuntime/cpp/Include/Core/Math/Array.h
Expand Up @@ -78,10 +78,10 @@ template<typename T, std::size_t size>class StatArrayDim1 : public BaseArray<T>
//{
// _real_array = otherArray._real_array;
//}

StatArrayDim1<T,size>& operator=(BaseArray<T>& rhs)
{
if (this != &rhs)
if (this != &rhs)
{
try
{
Expand All @@ -97,7 +97,7 @@ template<typename T, std::size_t size>class StatArrayDim1 : public BaseArray<T>
}
StatArrayDim1<T,size>& operator=(const StatArrayDim1<T,size>& rhs)
{
if (this != &rhs)
if (this != &rhs)
{
_real_array= rhs._real_array;
}
Expand Down Expand Up @@ -183,10 +183,10 @@ template<typename T ,std::size_t size1,std::size_t size2>class StatArrayDim2 : p
}
return *this;
}

StatArrayDim2<T,size1,size2>& operator=(BaseArray<T>& rhs)
{
if (this != &rhs)
if (this != &rhs)
{
try
{
Expand Down

0 comments on commit dad8e94

Please sign in to comment.