You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Igor Galić <i....@brainsware.org> on 2013/07/30 09:45:01 UTC

Re: git commit: TS-1685 Fix indentation before TS_MICRO removal


----- Original Message -----
> Updated Branches:
>   refs/heads/master 1e0aba26d -> d779cf80f
> 
> 
> TS-1685 Fix indentation before TS_MICRO removal

> @@ -141,8 +144,7 @@ public:
>    inkcoreapi sockaddr const* get_client_ip();
>  
>    HttpRequestData()
> -    : hdr(NULL), hostname_str(NULL), api_info(NULL),
> -      xact_start(0), incoming_port(0), tag(NULL)
> +    : hdr(NULL), hostname_str(NULL), api_info(NULL), xact_start(0),
> incoming_port(0), tag(NULL)
>    {
>      ink_zero(src_ip);
>      ink_zero(dest_ip);
> @@ -167,14 +169,10 @@ public:
>    void AllocateSpace(int num_entries);
>    char *NewEntry(matcher_line * line_info);
>    void Print();
> -  int getNumElements()
> -  {
> -    return num_el;
> -  };
> -  Data *getDataArray()
> -  {
> -    return data_array;
> -  };
> +
> +  int getNumElements() { return num_el; }
> +  Data *getDataArray() { return data_array; }
> +
>  #ifndef TS_MICRO
>  protected:
>  #endif

I didn't realize the extent of TS_MICRO, altering
public/private/protected behaviour sounds like a recipe for pain..


> @@ -197,14 +195,10 @@ public:
>    void AllocateSpace(int num_entries);
>    char *NewEntry(matcher_line * line_info);
>    void Print();
> -  int getNumElements()
> -  {
> -    return num_el;
> -  };
> -  Data *getDataArray()
> -  {
> -    return data_array;
> -  };
> +
> +  int getNumElements() { return num_el; }
> +  Data *getDataArray() { return data_array; }
> +
>  #ifndef TS_MICRO
>  protected:
>  #endif
> @@ -231,18 +225,11 @@ public:
>    void AllocateSpace(int num_entries);
>    char *NewEntry(matcher_line * line_info);
>    void Print();
> -  int getNumElements()
> -  {
> -    return num_el;
> -  };
> -  Data *getDataArray()
> -  {
> -    return data_array;
> -  };
> -  HostLookup *getHLookup()
> -  {
> -    return host_lookup;
> -  };
> +
> +  int getNumElements() { return num_el; }
> +  Data *getDataArray() { return data_array; }
> +  HostLookup *getHLookup() { return host_lookup; }
> +
>  #ifndef TS_MICRO
>  private:
>  #endif
> @@ -263,19 +250,12 @@ public:
>    void AllocateSpace(int num_entries);
>    char *NewEntry(matcher_line * line_info);
>    void Print();
> -  int getNumElements()
> -  {
> -    return num_el;
> -  };
> -  Data *getDataArray()
> -  {
> -    return data_array;
> -  };
>  
> -  //private:
> -  //void MatchArray(in_addr_t addr, RequestData* rdata, Result*
> result, void* array);
> +  int getNumElements() { return num_el; }
> +  Data *getDataArray() { return data_array; }
> +
>    static void PrintFunc(void *opaque_data);
> -  IpMap ip_map;          // Data structure to do lookups
> +  IpMap ip_map;                 // Data structure to do lookups
>    Data *data_array;             // array of the data lements with in
>    the table
>    int array_len;                // size of the arrays
>    int num_el;                   // number of elements in the table
> @@ -295,32 +275,22 @@ template<class Data, class Result> class
> ControlMatcher {
>  public:
>    // Parameter name must not be deallocated before this
>    //  object is
> -  ControlMatcher(const char *file_var, const char *name, const
> matcher_tags * tags, int flags_in = (ALLOW_HOST_TABLE |
> ALLOW_IP_TABLE | ALLOW_REGEX_TABLE | ALLOW_HOST_REGEX_TABLE |
> ALLOW_URL_TABLE));
> +  ControlMatcher(const char *file_var, const char *name, const
> matcher_tags * tags,
> +                 int flags_in = (ALLOW_HOST_TABLE | ALLOW_IP_TABLE |
> ALLOW_REGEX_TABLE |
> +                                 ALLOW_HOST_REGEX_TABLE |
> ALLOW_URL_TABLE));
>    ~ControlMatcher();
>    int BuildTable();
>    int BuildTableFromString(char *str);
>    void Match(RequestData * rdata, Result * result);
>    void Print();
>    char *config_file_var;        // temporary: until config is
>    integerated
> -  int getEntryCount()
> -  {
> -    return m_numEntries;
> -  }
> -  HostMatcher<Data, Result> *getHostMatcher() {
> -    return hostMatch;
> -  }
> -  RegexMatcher<Data, Result> *getReMatcher() {
> -    return reMatch;
> -  }
> -  UrlMatcher<Data, Result> *getUrlMatcher() {
> -    return urlMatch;
> -  }
> -  IpMatcher<Data, Result> *getIPMatcher() {
> -    return ipMatch;
> -  }
> -  HostRegexMatcher<Data, Result> *getHrMatcher() {
> -    return hrMatch;
> -  }
> +
> +  int getEntryCount() { return m_numEntries; }
> +  HostMatcher<Data, Result> *getHostMatcher() { return hostMatch; }
> +  RegexMatcher<Data, Result> *getReMatcher() { return reMatch; }
> +  UrlMatcher<Data, Result> *getUrlMatcher() { return urlMatch; }
> +  IpMatcher<Data, Result> *getIPMatcher() { return ipMatch; }
> +  HostRegexMatcher<Data, Result> *getHrMatcher() { return hrMatch; }
>  
>    //private:
>    RegexMatcher<Data, Result> *reMatch;
 

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE