]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Merge pull request #2263 from drwells/avoid-c-style-casts
authorLuca Heltai <luca.heltai@sissa.it>
Sun, 28 Feb 2016 23:23:18 +0000 (00:23 +0100)
committerLuca Heltai <luca.heltai@sissa.it>
Sun, 28 Feb 2016 23:23:18 +0000 (00:23 +0100)
Get rid of a C-style cast.

1  2 
source/lac/lapack_full_matrix.cc

index c6f79ba36c423265839f1b50230d36ef21c8b398,0a2440dcd793ef3a912ae00bcc986221e3118cf0..270f8bae8bfdcc1ac92f9434218db02c0eadcba1
@@@ -901,12 -899,11 +901,12 @@@ LAPACKFullMatrix<number>::compute_gener
    // sygv returns info=0 on success. Since we only queried the optimal size
    // for work, everything else would not be acceptable.
    Assert (info == 0, ExcInternalError());
 -  // Allocate working array according to suggestion.
 -  lwork = boost::math::iround(work[0]);
 +  // Allocate working array according to suggestion (same strategy as was
 +  // noted in compute_svd).
 +  lwork = static_cast<int>(work[0] + 1);
  
    // resize workspace array
-   work.resize((size_type) lwork);
+   work.resize(static_cast<size_type>(lwork));
  
    // Finally compute the generalized eigenvalues.
    sygv (&itype, jobz, uplo, &nn, values_A, &nn,

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.