[Groonga-commit] groonga/groonga at 1532fda [master] grn_ts: remove old comments

Back to archive index

susumu.yata null+****@clear*****
Tue Nov 10 13:25:47 JST 2015


susumu.yata	2015-11-10 13:25:47 +0900 (Tue, 10 Nov 2015)

  New Revision: 1532fda9da54f3b864ed38ff648daeb14b521ca4
  https://github.com/groonga/groonga/commit/1532fda9da54f3b864ed38ff648daeb14b521ca4

  Message:
    grn_ts: remove old comments

  Modified files:
    lib/ts/ts_expr.c

  Modified: lib/ts/ts_expr.c (+0 -106)
===================================================================
--- lib/ts/ts_expr.c    2015-11-10 13:06:54 +0900 (2a49829)
+++ lib/ts/ts_expr.c    2015-11-10 13:25:47 +0900 (9260667)
@@ -415,8 +415,6 @@ grn_ts_op_get_precedence(grn_ts_op_type op_type) {
   }
 }
 
-/* FIXME: The following implementation assumes that NaN values don't appear. */
-
 /* grn_ts_op_logical_not_bool() returns !arg. */
 inline static grn_ts_bool
 grn_ts_op_logical_not_bool(grn_ts_bool arg) {
@@ -1104,110 +1102,6 @@ grn_ts_op_modulus_float_float(grn_ctx *ctx, grn_ts_float lhs, grn_ts_float rhs,
   return GRN_SUCCESS;
 }
 
-#if 0
-/* grn_ts_op_plus_int() returns lhs + rhs. */
-inline static grn_ts_int
-grn_ts_op_plus_int(grn_ts_int lhs, grn_ts_int rhs) {
-  return lhs + rhs;
-}
-
-/* grn_ts_op_plus_float() returns lhs + rhs. */
-inline static grn_ts_float
-grn_ts_op_plus_float(grn_ts_float lhs, grn_ts_float rhs) {
-  return lhs + rhs;
-}
-
-/* grn_ts_op_plus_time_int() returns lhs + rhs (Time + Int = Time). */
-inline static grn_ts_time
-grn_ts_op_plus_time_int(grn_ts_time lhs, grn_ts_int rhs) {
-  return lhs + (rhs * 1000000);
-}
-
-/* grn_ts_op_plus_time_float() returns lhs + rhs (Time + Float = Time). */
-inline static grn_ts_time
-grn_ts_op_plus_time_float(grn_ts_time lhs, grn_ts_float rhs) {
-  return lhs + (grn_ts_int)(rhs * 1000000.0);
-}
-
-/* grn_ts_op_minus_int() returns lhs - rhs. */
-inline static grn_ts_int
-grn_ts_op_minus_int(grn_ts_int lhs, grn_ts_int rhs) {
-  return lhs - rhs;
-}
-
-/* grn_ts_op_minus_float() returns lhs - rhs. */
-inline static grn_ts_float
-grn_ts_op_minus_float(grn_ts_float lhs, grn_ts_float rhs) {
-  return lhs - rhs;
-}
-
-/* grn_ts_op_minus_time_time() returns lhs - rhs (Time - Time = Float). */
-inline static grn_ts_float
-grn_ts_op_minus_time_time(grn_ts_time lhs, grn_ts_time rhs) {
-  return (lhs - rhs) * 0.000001;
-}
-
-/* grn_ts_op_minus_time_int() returns lhs - rhs (Time - Int = Time). */
-inline static grn_ts_time
-grn_ts_op_minus_time_int(grn_ts_time lhs, grn_ts_int rhs) {
-  return lhs - (rhs * 1000000);
-}
-
-/* grn_ts_op_minus_time_float() returns lhs - rhs (Time - Float = Time). */
-inline static grn_ts_time
-grn_ts_op_minus_time_float(grn_ts_time lhs, grn_ts_float rhs) {
-  return lhs - (grn_ts_int)(rhs * 1000000.0);
-}
-
-/* grn_ts_op_multiplication_int() returns lhs * rhs. */
-inline static grn_ts_int
-grn_ts_op_multiplication_int(grn_ts_int lhs, grn_ts_int rhs) {
-  return lhs * rhs;
-}
-
-/* grn_ts_op_multiplication_float() returns lhs * rhs. */
-inline static grn_ts_float
-grn_ts_op_multiplication_float(grn_ts_float lhs, grn_ts_float rhs) {
-  return lhs * rhs;
-}
-
-/*
- * grn_ts_op_division_int() returns lhs / rhs.
- *
- * This function causes a critical error in the following cases:
- * - rhs == 0
- * - (lhs == INT64_MIN) && (rhs == -1)
- */
-inline static grn_ts_int
-grn_ts_op_division_int(grn_ts_int lhs, grn_ts_int rhs) {
-  return lhs / rhs;
-}
-
-/* grn_ts_op_division_float() returns lhs / rhs. */
-inline static grn_ts_float
-grn_ts_op_division_float(grn_ts_float lhs, grn_ts_float rhs) {
-  return lhs / rhs;
-}
-
-/*
- * grn_ts_op_modulus_int() returns lhs % rhs.
- *
- * This function causes a critical error in the following cases:
- * - rhs == 0
- * - (lhs == INT64_MIN) && (rhs == -1)
- */
-inline static grn_ts_int
-grn_ts_op_modulus_int(grn_ts_int lhs, grn_ts_int rhs) {
-  return lhs % rhs;
-}
-
-/* grn_ts_op_modulus_float() returns lhs % rhs. */
-inline static grn_ts_float
-grn_ts_op_modulus_float(grn_ts_float lhs, grn_ts_float rhs) {
-  return fmod(lhs, rhs);
-}
-#endif
-
 /*-------------------------------------------------------------
  * Groonga objects.
  */
-------------- next part --------------
HTML����������������������������...
Download 



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