Ignore:
Timestamp:
Jul 9, 2009, 10:38:53 AM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
bd86e8
Parents:
669a7e
Message:

fixed compiler warning: deprecated conversion from string const to char * by changed char* to const char*

  • "hello" represents a const char *. Hence, if we point a char* at it, it may subsequently be altered, which is not allowed due to its const nature. Hence, the warning. However, we do not change the strings anyway, hence changing to const char *.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/datacreator.cpp

    r669a7e rc12297  
    5454 * \return true if file was written successfully
    5555 */
    56 bool CreateDataEnergyOrder(class EnergyMatrix &Fragments, class KeySetsContainer &KeySet, char *dir, char *prefix, char *msg, char *datum)
     56bool CreateDataEnergyOrder(class EnergyMatrix &Fragments, class KeySetsContainer &KeySet, const char *dir, const char *prefix, const char *msg, const char *datum)
    5757{
    5858        stringstream filename;
     
    8787 * \return true if file was written successfully
    8888 */
    89 bool CreateDataDeltaEnergyOrder(class EnergyMatrix &Energy, class EnergyMatrix &Fragments, class KeySetsContainer &KeySet, char *dir, char *prefix, char *msg, char *datum)
     89bool CreateDataDeltaEnergyOrder(class EnergyMatrix &Energy, class EnergyMatrix &Fragments, class KeySetsContainer &KeySet, const char *dir, const char *prefix, const char *msg, const char *datum)
    9090{
    9191        stringstream filename;
     
    124124 * \return true if file was written successfully
    125125 */
    126 bool CreateDataForcesOrder(class ForceMatrix &Fragments, class KeySetsContainer &KeySet, char *dir, char *prefix, char *msg, char *datum, void (*CreateForce)(class MatrixContainer &, int))
     126bool CreateDataForcesOrder(class ForceMatrix &Fragments, class KeySetsContainer &KeySet, const char *dir, const char *prefix,const  char *msg, const char *datum, void (*CreateForce)(class MatrixContainer &, int))
    127127{
    128128        stringstream filename;
     
    156156 * \return true if file was written successfully
    157157 */
    158 bool CreateDataDeltaForcesOrder(class ForceMatrix &Force, class ForceMatrix &Fragments, class KeySetsContainer &KeySet, char *dir, char *prefix, char *msg, char *datum, void (*CreateForce)(class MatrixContainer &, int))
     158bool CreateDataDeltaForcesOrder(class ForceMatrix &Force, class ForceMatrix &Fragments, class KeySetsContainer &KeySet, const char *dir, const char *prefix, const char *msg, const char *datum, void (*CreateForce)(class MatrixContainer &, int))
    159159{
    160160        stringstream filename;
     
    188188 * \return true if file was written successfully
    189189 */
    190 bool CreateDataDeltaForcesOrderPerAtom(class ForceMatrix &Force, class ForceMatrix &Fragments, class KeySetsContainer &KeySet, char *dir, char *prefix, char *msg, char *datum)
     190bool CreateDataDeltaForcesOrderPerAtom(class ForceMatrix &Force, class ForceMatrix &Fragments, class KeySetsContainer &KeySet, const char *dir, const char *prefix, const char *msg, const char *datum)
    191191{
    192192        stringstream filename;
     
    213213                                                norm += Force.Matrix[Force.MatrixCounter][ j ][l+m]*Force.Matrix[Force.MatrixCounter][ j ][l+m];
    214214                                        norm = sqrt(norm);
    215                                 }                                                                                                                                                                                                                                                                                                                                                                                                               
     215                                }
    216216//                              if (norm < MYEPSILON)
    217217                                        output << scientific << Fragments.Matrix[Fragments.MatrixCounter][ j ][l] << "\t";
     
    235235 * \return true if file was written successfully
    236236 */
    237 bool CreateDataForcesOrderPerAtom(class ForceMatrix &Fragments, class KeySetsContainer &KeySet, char *dir, char *prefix, char *msg, char *datum)
     237bool CreateDataForcesOrderPerAtom(class ForceMatrix &Fragments, class KeySetsContainer &KeySet, const char *dir, const char *prefix, const char *msg, const char *datum)
    238238{
    239239        stringstream filename;
     
    264264/** Plot matrix vs. fragment.
    265265 */
    266 bool CreateDataFragment(class MatrixContainer &Fragment, class KeySetsContainer &KeySet, char *dir, char *prefix, char *msg, char *datum, void (*CreateFragment)(class MatrixContainer &, int))
     266bool CreateDataFragment(class MatrixContainer &Fragment, class KeySetsContainer &KeySet, const char *dir, const char *prefix, const char *msg, const char *datum, void (*CreateFragment)(class MatrixContainer &, int))
    267267{
    268268        stringstream filename;
     
    329329/** Plot matrix vs. fragment.
    330330 */
    331 bool CreateDataFragmentOrder(class MatrixContainer &Fragment, class KeySetsContainer &KeySet, char *dir, char *prefix, char *msg, char *datum, void (*CreateFragmentOrder)(class MatrixContainer &, class KeySetsContainer &, int))
     331bool CreateDataFragmentOrder(class MatrixContainer &Fragment, class KeySetsContainer &KeySet, const char *dir, const char *prefix, const char *msg, const char *datum, void (*CreateFragmentOrder)(class MatrixContainer &, class KeySetsContainer &, int))
    332332{
    333333        stringstream filename;
     
    649649{
    650650        stringstream line(Force.Header);
    651         char *fillcolor[5] = {"black", "red", "blue", "green", "cyan"};
     651        const char *fillcolor[5] = {"black", "red", "blue", "green", "cyan"};
    652652        string token;
    653653
     
    681681{
    682682        stringstream line(Force.Header);
    683         char *fillcolor[5] = {"black", "red", "blue", "green", "cyan"};
     683        const char *fillcolor[5] = {"black", "red", "blue", "green", "cyan"};
    684684        string token;
    685685
Note: See TracChangeset for help on using the changeset viewer.