]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/include/matrix.hh
Run grand-replace (issue 3765)
[lilypond.git] / flower / include / matrix.hh
index f0676c2d730ba613beaa864d5b713d81e6210849..7b7e8540afc5d6b52cd0957b933bef20e1c0079f 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2006--2010 Joe Neeman <joeneeman@gmail.com>
+  Copyright (C) 2006--2014 Joe Neeman <joeneeman@gmail.com>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
 
 #include "std-vector.hh"
 
-template<class T, class A=std::allocator<T> >
+template<class T, class A = std::allocator<T> >
 class Matrix
 {
 public:
@@ -32,7 +32,7 @@ public:
   }
 
   Matrix<T, A> (vsize rows, vsize columns, T const &t)
-  : data_(rows * columns, t)
+    : data_ (rows *columns, t)
   {
     rank_ = rows;
   }
@@ -57,15 +57,15 @@ public:
       data_.resize (rows * columns, t);
     else
       {
-       vector<T,A> new_data;
-       new_data.resize (rows * columns, t);
-       vsize cur_cols = rank_ ? data_.size () / rank_: 0;
-
-       for (vsize i = 0; i < cur_cols; i++)
-         for (vsize j = 0; j < rank_; j++)
-           new_data[i*rows + j] = data_[i*rank_ + j];
-       rank_ = rows;
-       data_ = new_data;
+        vector<T, A> new_data;
+        new_data.resize (rows * columns, t);
+        vsize cur_cols = rank_ ? data_.size () / rank_ : 0;
+
+        for (vsize i = 0; i < cur_cols; i++)
+          for (vsize j = 0; j < rank_; j++)
+            new_data[i * rows + j] = data_[i * rank_ + j];
+        rank_ = rows;
+        data_ = new_data;
       }
   }