[Groonga-mysql-commit] mroonga/mroonga [master] Add const to unmodified strings

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Apr 16 00:39:39 JST 2013


Kouhei Sutou	2013-04-16 00:39:39 +0900 (Tue, 16 Apr 2013)

  New Revision: 0cbcc26e9d5c59f56e472a2eb4d2035d71a6ba7e
  https://github.com/mroonga/mroonga/commit/0cbcc26e9d5c59f56e472a2eb4d2035d71a6ba7e

  Message:
    Add const to unmodified strings

  Modified files:
    mrn_table.cpp

  Modified: mrn_table.cpp (+3 -3)
===================================================================
--- mrn_table.cpp    2013-04-16 00:38:20 +0900 (877141c)
+++ mrn_table.cpp    2013-04-16 00:39:39 +0900 (6b326ad)
@@ -286,8 +286,8 @@ int mrn_parse_table_param(MRN_SHARE *share, TABLE *table)
 {
   int i, error;
   int title_length;
-  char *sprit_ptr[2];
-  char *tmp_ptr, *start_ptr;
+  const char *sprit_ptr[2];
+  const char *tmp_ptr, *start_ptr;
 #ifdef WITH_PARTITION_STORAGE_ENGINE
   partition_element *part_elem;
   partition_element *sub_elem;
@@ -355,7 +355,7 @@ int mrn_parse_table_param(MRN_SHARE *share, TABLE *table)
 
     {
       std::string params_string(params_string_value, params_string_length);
-      sprit_ptr[0] = const_cast<char *>(params_string.c_str());
+      sprit_ptr[0] = params_string.c_str();
       while (sprit_ptr[0])
       {
         if ((sprit_ptr[1] = strchr(sprit_ptr[0], ',')))
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-mysql-commit mailing list
Back to archive index