more test cases

more test cases

--- test/realm/serializing.cc
+++ test/realm/serializing.cc
@@ -75,7 +75,7 @@
 }

 template <typename T>
-void test_dynamic(const char *name, const T& input, size_t exp_size = 0)
+size_t test_dynamic(const char *name, const T& input, size_t exp_size = 0)
 {
   // first serialize and check size
   Realm::Serialization::DynamicBufferSerializer dbs(0);
@@ -133,12 +133,95 @@
   }

   free(buffer);
+
+  return act_size;
+}
+
+template <typename T>
+void test_size(const char *name, const T& input, size_t exp_size)
+{
+  Realm::Serialization::ByteCountSerializer bcs;
+
+  bool ok = bcs << input;
+  if(!ok) {
+    std::cout << "ERROR: " << name << "byetcount serialization failed!" << std::endl;
+    error_count++;
+  }
+
+  size_t act_size = bcs.bytes_used();
+  if(act_size != exp_size) {
+    std::cout << "ERROR: " << name << "bytecount size = " << act_size << " (should be " << exp_size << ")" << std::endl;
+    error_count++;
+  } else {
+    if(verbose)
+      printf("OK: %s bytecount size = %zd\n", name, act_size);
+  }
+}
+
+template <typename T>
+void test_fixed(const char *name, const T& input, size_t exp_size)
+{
+  // first serialize and check size
+  void *buffer = malloc(exp_size);
+  Realm::Serialization::FixedBufferSerializer fbs(buffer, exp_size);
+
+  bool ok1 = fbs << input;
+  if(!ok1) {
+    std::cout << "ERROR: " << name << "fixed serialization failed!" << std::endl;
+    error_count++;
+  }
+
+  ptrdiff_t leftover = fbs.bytes_left();
+
+  if(leftover != 0) {
+    std::cout << "ERROR: " << name << "fixed leftover = " << leftover << std::endl;
+    error_count++;
+  } else {
+    if(verbose)
+      printf("OK: %s fixed leftover = %zd\n", name, leftover);
+  }
+
+  // now deserialize into a new object and test for equality
+  Realm::Serialization::FixedBufferDeserializer fbd(buffer, exp_size);
+  T output;
+
+  bool ok2 = fbd >> output;
+  if(!ok2) {
+    printf("ERROR: %s fixed deserialization failed!\n", name);
+    error_count++;
+  }
+
+  leftover = fbd.bytes_left();
+  if(leftover != 0) {
+    printf("ERROR: %s fixed leftover = %zd\n", name, leftover);
+    error_count++;
+  }
+
+  bool ok3 = (input == output);
+  if(ok3) {
+    if(verbose)
+      printf("OK: %s fixed output matches\n", name);
+  } else {
+    printf("ERROR: %s fixed output mismatch:\n", name);
+    std::cout << "Input:  " << input << std::endl;
+    std::cout << "Buffer: [" << exp_size << "]";
+    std::cout << std::hex;
+    for(size_t i = 0; i < exp_size; i++)
+      std::cout << ' ' << std::setfill('0') << std::setw(2) << (int)((unsigned char *)buffer)[i];
+    std::cout << std::dec << std::endl;
+    std::cout << "Output: " << output << std::endl;
+    error_count++;
+  }
+
+  free(buffer);
 }

 template <typename T>
 void do_test(const char *name, const T& input, size_t exp_size = 0)
 {
-  test_dynamic(name, input, exp_size);
+  exp_size = test_dynamic(name, input, exp_size);
+  test_size(name, input, exp_size);
+  test_fixed(name, input, exp_size);
 }

 template <typename T1, typename T2>
@@ -179,7 +262,11 @@

 typedef Pair<double, char> PODPacked2;
 template <typename S>
-bool operator&(S& s, const PODPacked& p) { return (s & p.x) && (s & p.y); }
+bool operator&(S& s, const PODPacked2& p) { return (s & p.x) && (s & p.y); }
+
+typedef Pair<PODPacked, int> PP2;
+template <typename S>
+bool operator&(S& s, const PP2& p) { return (s & p.x) && (s & p.y); }

 int main(int argc, const char *argv[])
 {
@@ -210,13 +297,27 @@

   do_test("pod packed", PODPacked(8.5, 9.1), 12 /* not sizeof(PODPacked)*/);

-  //do_test("pod packed2", PODPacked2(10.5, 'z'), 9 /* not sizeof(PODPacked2)*/);
+  do_test("pod packed2", PODPacked2(10.5, 'z'), 9 /* not sizeof(PODPacked2)*/);
+
+  do_test("pp2", PP2(PODPacked(44.3, 1), 9), 16 /* not sizeof(PP2) */);

   std::vector<int> a(3);
   a[0] = 1;
   a[1] = 2;
   a[2] = 3;
   do_test("vector<int>", a, sizeof(size_t) + a.size() * sizeof(int));
+
+  std::vector<PODStruct> a2(1);
+  a2[0] = PODStruct(3, 4);
+  do_test("vector<PODStruct>", a2, sizeof(size_t) + a2.size() * sizeof(PODStruct));
+
+  std::vector<PODPacked> a3(1);
+  a3[0] = PODPacked(3, 4);
+  do_test("vector<PODPacked>", a3, sizeof(size_t) + 12 /* not sizeof(PODPacked)*/);
+
+  std::vector<PODPacked2> a4(1);
+  a4[0] = PODPacked2(3, 4);
+  do_test("vector<PODPacked2>", a4, sizeof(size_t) + 9 /* not sizeof(PODPacked2)*/);

   std::list<int> b;
   b.push_back(4);
@@ -230,4 +331,17 @@
   c[9] = 2.2;
   c[10] = 3.3;
   do_test("map<int,double>", c, sizeof(size_t) + c.size() * 16 /*alignment*/);
-}
+
+  std::vector<std::string> ss;
+  ss.push_back("Hello");
+  ss.push_back("World");
+  do_test("vector<string>", ss, sizeof(size_t) + 12 + 9);
+
+  if(error_count > 0) {
+    std::cout << "ERRORS FOUND" << std::endl;
+    exit(1);
+  } else {
+    std::cout << "all tests passed" << std::endl;
+    exit(0);
+  }
+}


removed warning

removed warning

--- Visualization_Library_SDK/src/vl/VisualizationLibrary.cpp
+++ Visualization_Library_SDK/src/vl/VisualizationLibrary.cpp
@@ -260,6 +260,7 @@
       case vl::VEL_VERBOSITY_ERROR:  Log::print("ERROR\n"); break;
       case vl::VEL_VERBOSITY_NORMAL: Log::print("NORMAL\n"); break;
       case vl::VEL_VERBOSITY_DEBUG:  Log::print("DEBUG\n"); break;
+      default: break;
     }
     Log::print( Say("Check OpenGL States = %s\n") << (settings()->checkOpenGLStates()?"YES":"NO") );
     Log::print( Say("Check Transform Siblings = %s\n") << (settings()->checkTransformSiblings()?"YES":"NO") );


fixed build wo libcpuid

fixed build wo libcpuid

--- libethcore/EthashCPUMiner.cpp
+++ libethcore/EthashCPUMiner.cpp
@@ -35,6 +35,7 @@

 unsigned EthashCPUMiner::s_numInstances = 0;

+#if ETH_CPUID || !ETH_TRUE
 static string jsonEncode(map<string, string> const& _m)
 {
 	string ret = "{";
@@ -50,6 +51,7 @@

 	return ret + "}";
 }
+#endif

 void EthashCPUMiner::workLoop()
 {


restructured the program: moved definition of read into own file, removed from main program. Moved main program to main directory.

--- preqc-lr/preqclr.cpp
+++ preqc-lr/preqclr.cpp
@@ -1,504 +0,0 @@
-#include <algorithm>
-#include <fstream>
-#include <functional>
-#include <iostream>
-#include <list>
-#include <map>
-#include <math.h>
-#include <sstream>
-#include <string>
-#include <vector>
-
-#include <zlib.h>
-#include <stdio.h>
-#include <getopt.h>
-
-#include "include/readfq/kseq.h"
-
-#include "include/rapidjson/document.h"
-#include "include/rapidjson/writer.h"
-#include "include/rapidjson/stringbuffer.h"
-#include "include/rapidjson/prettywriter.h"
-#include "include/rapidjson/filereadstream.h"
-#include "include/rapidjson/filewritestream.h"
-
-KSEQ_INIT(gzFile, gzread)
-
-#define VERSION "2.0"
-#define SUBPROGRAM "calculate"
-#define read seq_segs
-
-using namespace std;
-using namespace rapidjson;
-
-typedef PrettyWriter<StringBuffer> JSONWriter;
-
-namespace opt
-{
-    static unsigned int verbose;
-    static string reads_file;
-    static string paf_file;
-    static string gfa_file;
-    static string type;
-    static string sample_name;
-}
-
-// TODO: move to own header file...
-class read
-{
-    public:
-        string read_id;
-        unsigned int read_len;
-        unsigned long total_len_overlaps;
-        int total_num_overlaps;
-    void set(string i, int l, int lol)
-    {
-        read_id = i;
-        read_len = l;
-        total_len_overlaps = lol;
-        total_num_overlaps = 1;
-    }
-    void updateOverlap(int new_ol_len)
-    {
-        total_len_overlaps += new_ol_len;
-        total_num_overlaps += 1;
-    }
-};
-
-void calculate_est_cov_and_est_genome_size( map<string, read> paf, JSONWriter* writer );
-void calculate_read_length( map<string, read> paf, JSONWriter* writer);
-void calculate_GC_content( string readsFile, JSONWriter* writer);
-void calculate_tot_bases( map<string, read> paf, JSONWriter* writer);
-
-int getopt( int argc, char *const arv[], const char *optstring);
-enum { OPT_VERSION };
-void parse_args( int argc, char *argv[]);
-map<string, read> parse_paf();
-
-int main( int argc, char *argv[])
-{
-    // parse the input arguments, if successful it will save all the arguments
-    // in the global struct opts
-    parse_args(argc, argv);
-
-    // parse the input PAF file and return a map with key = read id,
-    // and value = read object with all needed read info
-    map<string, read> paf_records = parse_paf();
-
-    // start the JSON object
-    StringBuffer s;
-    JSONWriter writer(s);
-    writer.StartObject();
-
-    // add input arguments
-    writer.String("sample_name");
-    writer.String(opt::sample_name.c_str());
-
-    // start calculations
-    calculate_read_length( paf_records, &writer);
-    calculate_est_cov_and_est_genome_size( paf_records, &writer);
-    calculate_GC_content( opt::reads_file, &writer);
-    calculate_tot_bases( paf_records, &writer);
-
-    // convert JSON document to string and print
-    writer.EndObject();
-    cout << s.GetString() << endl;
-
-}
-
-void parse_args ( int argc, char *argv[])
-{
-    // getopt
-    extern char *optarg;
-    extern int optind, opterr, optopt;
-    const char* const short_opts = "hvr:t:n:p:g:";
-    const option long_opts[] = {
-        {"verbose",         no_argument,        NULL,   'v'},
-        {"version",         no_argument,        NULL,   OPT_VERSION},
-        {"reads",           required_argument,  NULL,   'r'},
-        {"type",            required_argument,  NULL,   't'},
-        {"sample_name", required_argument,  NULL,   'n'},
-        {"paf",         required_argument,  NULL,   'p'},
-        {"gfa",         optional_argument,  NULL,   'g'},
-        {"help",            no_argument,    NULL,   'h'},
-        { NULL,         0,  NULL,   0}
-    };
-
-    static const char* PREQCLR_CALCULATE_VERSION_MESSAGE =
-    "preqclr-" SUBPROGRAM " version " VERSION "\n"
-    "Written by Joanna Pineda.\n"
-    "\n"
-    "Copyright 2017 Ontario Institute for Cancer Research\n";
-
-    static const char* PREQCLR_CALCULATE_USAGE_MESSAGE =
-    "Usage: preqclr version " VERSION " " SUBPROGRAM " [OPTIONS] --reads reads.fa --type {ont|pb} --paf overlaps.paf --gfa layout.gfa \n"
-    "Calculate information for preqclr report\n"
-    "\n"
-    "-v, --verbose              display verbose output\n"
-    "        --version              display version\n"
-    "-r, --reads                Fasta, fastq, fasta.gz, or fastq.gz files containing reads\n"
-    "-t, --type             Type of long read sequencer. Either pacbio (pb) or oxford nanopore technology data (ont)\n"
-    "-n, --sample_name          Sample name; you can use the name of species for example. This will be used as output prefix\n"
-    "-p, --paf              Minimap2 pairwise alignment file (PAF). This is produced using \'minimap2 -x ava-ont sample.fastq sample.fasta"
-    "\n"
-    "-g, --gfa              Miniasm graph gragment assembly (GFA) file. This is produced using \'miniasm -f reads.fasta overlaps.paf\'\n"
-    "\n";
-
-    int rflag=0, tflag=0, nflag=0, pflag=0, gflag=0, verboseflag=0, versionflag=0;
-    int c;
-    while ( (c = getopt_long(argc, argv, short_opts, long_opts, NULL)) != -1 ) {
-    // getopt will loop through arguments, returns -1 when end of options, and store current arg in optarg
-    // if optarg is not null, keep as optarg else ""
-    std::istringstream arg(optarg != NULL ? optarg : "");
-    switch(c) {
-        case 'v':
-            opt::verbose = 1; // set verbose flag
-            break;
-        case OPT_VERSION:
-            cout << PREQCLR_CALCULATE_VERSION_MESSAGE << endl;
-            exit(0);
-        case 'r':
-            rflag = 1;
-            arg >> opt::reads_file;
-            break;
-        case 't':
-            tflag = 1;
-            if (( arg.str().compare("ont")    != 0 ) && ( arg.str().compare("pb") != 0 )) {
-                fprintf(stderr, "preqclr %s: option -t,--type is missing a valid argument {ont,pb}. \n\n", SUBPROGRAM);
-                fprintf(stderr, PREQCLR_CALCULATE_USAGE_MESSAGE, argv[0]);
-                exit(1);
-            }
-            arg >> opt::type;
-            break;
-        case 'n':
-            nflag = 1;
-            arg >> opt::sample_name;
-            break;
-        case 'p':
-            pflag = 1;
-            arg >> opt::paf_file;
-            break;
-        case 'g':
-            gflag = 1;
-            arg >> opt::gfa_file;
-            break;
-        case 'h':
-            cout << PREQCLR_CALCULATE_USAGE_MESSAGE << endl;
-            exit(0);
-        case ':':
-            fprintf(stderr, "preqclr %s: option `-%c' is missing a required argument\n", SUBPROGRAM, optopt);
-            fprintf(stderr, PREQCLR_CALCULATE_USAGE_MESSAGE, argv[0]);
-            exit(1);
-        case '?':
-            // invalid option: getopt_long already printed an error message
-            fprintf(stderr, "preqclr %s: option `-%c' is invalid: ignored\n", SUBPROGRAM, optopt);
-            fprintf(stderr, PREQCLR_CALCULATE_USAGE_MESSAGE, argv[0]);
-            break;
-        }
-    }
-    if( argc < 4 ) {
-        cerr << PREQCLR_CALCULATE_USAGE_MESSAGE << endl;
-        exit(1);
-    }
-
-    // print any remaining command line argumentes
-    if (optind < argc) {
-        for (; optind < argc; optind++)
-            cerr << "preqclr " << SUBPROGRAM << ": too many arguments:"
-                 << " argv[optind]" << endl;
-    }
-
-    // check mandatory variables and assign defaults
-    if ( rflag == 0 ) {
-        fprintf(stderr, "preqclr %s: missing -r,--reads option\n\n", SUBPROGRAM);
-        fprintf(stderr, PREQCLR_CALCULATE_USAGE_MESSAGE, argv[0]);
-        exit(1);
-    }
-    if ( nflag == 0 ) {
-        fprintf(stderr, "preqclr %s: missing -n,--sample_name option\n\n", SUBPROGRAM);
-        fprintf(stderr, PREQCLR_CALCULATE_USAGE_MESSAGE);
-        exit(1);
-    }
-    if ( pflag == 0 ) {
-        fprintf(stderr, "preqclr %s: missing -p,--paf option\n\n", SUBPROGRAM);
-        fprintf(stderr, PREQCLR_CALCULATE_USAGE_MESSAGE);
-        exit(1);
-    }
-    if ( tflag == 0 ) {
-        fprintf(stderr, "preqclr %s: missing -t,--type option\n\n", SUBPROGRAM);
-        fprintf(stderr, PREQCLR_CALCULATE_USAGE_MESSAGE);
-        exit(1);
-    }
-
-    // check if an option is used more than once
-    // check if files exist and are readable ...
-
-
-
-};
-
-map<string, read> parse_paf()
-{
-    // read each line in paf file passed on by user
-    string line;
-    ifstream infile(opt::paf_file);
-    map<string, read> paf_records;
-    while( getline(infile, line) ) {
-
-        // read each line/overlap and save each column into variable
-        string qname;
-        unsigned int qlen, qstart, qend;
-        char strand;
-        string tname;
-        unsigned int tlen, tstart, tend;
-        stringstream ss(line);
-        ss >> qname >> qlen >> qstart >> qend >> strand >> tname >> tlen >> tstart >> tend;
-
-        if ( qname.compare(tname) != 0 ) {
-            unsigned int qprefix_len = qstart;
-            unsigned int qsuffix_len = qlen - qend;
-            unsigned int tprefix_len = tstart;
-            unsigned int tsuffix_len = tlen - tend;
-
-            // calculate overlap length, we need to take into account minimap2's softclipping
-            int left_clip = 0, right_clip = 0;
-            if ( ( qstart != 0 ) && ( tstart != 0 ) ){
-                if ( strand == '+' ) {
-                    left_clip += min(qprefix_len, tprefix_len);
-                } else {
-                    left_clip += min(qprefix_len, tsuffix_len);
-                }
-            }
-            if ( ( qend != 0 ) && ( tend != 0 ) ){
-                if ( strand == '+' ) {
-                    right_clip += min(qsuffix_len, tsuffix_len);
-                } else {
-                    right_clip += min(qsuffix_len, tprefix_len);
-                }
-            }
-
-            unsigned long overlap_len = (qend - qstart) + left_clip + right_clip;
-
-            // add this information to paf_records dictionary
-            auto i = paf_records.find(qname);
-            if ( i == paf_records.end() ) {
-                // if read not found initialize in paf_records
-                read qr;
-                qr.set(qname, qlen, overlap_len);
-                paf_records.insert(pair<string,read>(qname, qr));
-            } else {
-                // if read found, update the overlap info
-                i->second.updateOverlap(overlap_len);
-            }
-            auto j = paf_records.find(tname);
-            if ( j == paf_records.end() ) {
-                // if target read not found initialize in paf_records
-                read tr;
-                tr.set(tname, tlen, overlap_len);
-                paf_records.insert(pair<string,read>(tname, tr));
-            } else {
-                // if target read found, update the overlap info
-                j->second.updateOverlap(overlap_len);
-            }
-        }
-    }
-
-    // let's check the records...
-    for ( auto const& r : paf_records ) {
-        // Accessing KEY from element pointed by it
-        string read_id = r.first;
-        read temp = r.second;
-    }
-
-   return paf_records;
-}
-
-void calculate_tot_bases( map<string, read> paf, JSONWriter* writer)
-{
-    /*
-    ========================================================
-    Calculating total number of bases as a function of
-    min read length
-    --------------------------------------------------------
-    Shows the total number of bases with varying minimum
-    read length cut offs.
-    Input:      Dictionary of reads with read length info in value
-    Output:     Dictionary:
-                key   = read length cut off
-                value = total number of bases
-    ========================================================
-    */
-
-    // bin the reads by read length
-    map < unsigned long, unsigned long, greater<unsigned long>> read_lengths;
-    for( auto it = paf.begin(); it != paf.end(); it++) {
-        string id = it->first;
-        int r_len = it->second.read_len;
-
-        // add as new read length if read length not in map yet
-        auto j = read_lengths.find(r_len);
-        if ( j == read_lengths.end() ) {
-            // if read length not found
-            read_lengths.insert( pair<int,int>(r_len, 1) );
-        } else {
-            // if read length found
-            j->second+=1;
-        }
-    }
-
-    // sort read lengths
-    // display items in sorted order of keys
-    writer->Key("total_num_bases_vs_min_read_length");
-    writer->StartObject();
-    unsigned long curr_longest;
-    unsigned long tot_num_bases = 0;
-    for (const auto& p : read_lengths) {
-        curr_longest = p.first;
-        tot_num_bases += ( p.second * p.first);
-        string key = to_string( curr_longest );
-        writer->Key(key.c_str());
-        writer->Int(tot_num_bases);
-    }
-    writer->EndObject();
-}
-
-void calculate_GC_content( string file, JSONWriter* writer )
-{
-    /*
-    ========================================================
-    Calculating GC-content per read
-    --------------------------------------------------------
-    Parses through read file and counts the Cs and Gs,
-    then divides by the read length.
-    Input:     Path to reads FILE
-    Output:    List of GC content of all reads
-    ========================================================
-    */
-
-    vector < double > GC_content;
-    gzFile fp;
-    kseq_t *seq;
-    const char *c = file.c_str();
-    fp = gzopen(c, "r");
-    seq = kseq_init(fp);
-    writer->Key("read_counts_per_GC_content");
-    writer->StartArray();
-    while (kseq_read(seq) >= 0) {
-         string id = seq->name.s;
-         string sequence = seq->seq.s;
-         size_t C_count = count(sequence.begin(), sequence.end(), 'C');
-         size_t G_count = count(sequence.begin(), sequence.end(), 'G');
-         double r_len = sequence.length();
-         double gc_cont = (double( C_count + G_count ) / r_len) *100.0;
-         writer->Double(gc_cont);
-    }
-    writer->EndArray();
-    kseq_destroy(seq);
-    gzclose(fp);
-}
-
-void calculate_est_cov_and_est_genome_size( map<string, read> paf, JSONWriter* writer )
-{
-    /*
-    ========================================================
-    Calculating est cov per read and est genome size
-    --------------------------------------------------------
-    For each read uses length and sum of lengths of all
-    overlaps.
-    Input:    PAF records dictionary
-    Output:   Dictionary: (each entry is a read)
-              key = est coverage
-              value = read length
-    ========================================================
-    */
-
-    vector< pair < int, int > > covs;
-    double r_len, r_tot_len_ol, r_tot_num_ol, r_cov;
-
-    // make an object that will hold pair of coverage and read length
-    writer->Key("per_read_est_cov_and_read_length");
-    writer->StartObject();
-    for( auto it = paf.begin(); it != paf.end(); it++)
-    {
-        string id = it->first;
-        read r = it->second;
-        float r_len = float(r.read_len);
-        unsigned long r_tot_len_ol = r.total_len_overlaps;
-        float r_cov = r_tot_len_ol / r_len;
-        string key = to_string(r_cov);
-        writer->Key(key.c_str());
-        writer->Int(r_len);
-        covs.push_back(make_pair(r_cov,r_len));
-    }
-    writer->EndObject();
-
-    // filter the coverage: remove if outside 1.5*interquartile_range
-    // calculate IQR
-    // sort the estimated coverages
-    sort(covs.begin(), covs.end());
-
-    // get the index of the 25th and 75th percentile item
-    int i25 = ceil(covs.size() * 0.25);
-    int i75 = ceil(covs.size() * 0.75);
-
-    // find IQR
-    int IQR = covs[i75].first - covs[i25].first;
-    double bd = IQR*1.5;
-    int lowerbound = double(covs[i25].first) - bd;
-    int upperbound = double(covs[i75].first) + bd;
-
-    // create a new set after applying this filter
-    // stores info of set of reads after filtering:
-    unsigned long sum_len = 0;
-    unsigned long sum_cov = 0;
-    float tot_reads = 0;
-    for( auto it = covs.begin(); it != covs.end(); ++it) {
-        if (( it->first > lowerbound ) && ( it->first < upperbound )) {
-            unsigned long co = it->first;
-            unsigned long le = it->second;
-            sum_len += le;
-            sum_cov += co;
-            tot_reads += 1;
-        }
-    }
-
-    // calculate estimated genome size
-    float mean_read_len = sum_len / tot_reads;
-    float mean_cov = sum_cov / tot_reads;
-    float est_genome_size = ( tot_reads * mean_read_len ) / mean_cov;
-
-    // now store in JSON object
-    writer->Key("est_cov_post_filter_info");
-    writer->StartArray();
-    writer->Double(lowerbound);
-    writer->Double(upperbound);
-    writer->Int(tot_reads);
-    writer->Double(IQR);
-    writer->EndArray();
-    writer->Key("est_genome_size");
-    writer->Double(est_genome_size);
-}
-
-void calculate_read_length( map<string, read> paf, JSONWriter* writer)
-{
-    /*
-    ========================================================
-    Calculating read lengths
-    --------------------------------------------------------
-    For each read add read lengths to JSON object
-    Input:        PAF records dictionary
-    Output:     List of all read lengths
-    ========================================================
-    */
-
-    writer->Key("per_read_read_length");
-    writer->StartArray();
-
-    // loop through the map of reads and get read lengths
-    for(auto it = paf.begin(); it != paf.end(); it++) {
-        read r = it->second;
-        int r_len = r.read_len;
-        writer->Int(r_len);
-    }
-    writer->EndArray();
-}


Use asynchronous load to allow the usage of eGroupware resource

svn path=/trunk/kdepim/; revision=323243

--- libkdepim/addressesdialog.cpp
+++ libkdepim/addressesdialog.cpp
@@ -810,7 +810,7 @@
 void
 AddressesDialog::saveAs()
 {
-  KABC::DistributionListManager manager( KABC::StdAddressBook::self() );
+  KABC::DistributionListManager manager( KABC::StdAddressBook::self( true ) );
   manager.load();

   if ( !d->ui->mSelectedView->firstChild() ) {
@@ -952,7 +952,7 @@
 void
 AddressesDialog::addDistributionLists()
 {
-  KABC::DistributionListManager manager( KABC::StdAddressBook::self() );
+  KABC::DistributionListManager manager( KABC::StdAddressBook::self( true ) );
   manager.load();

   QStringList distLists = manager.listNames();


fix typo in shared_queue.hpp exampel -> example (#363)

--- src/g3log/shared_queue.hpp
+++ src/g3log/shared_queue.hpp
@@ -11,7 +11,7 @@
 * the help from the std::thread library from JustSoftwareSolutions
 * ref: http://www.stdthread.co.uk/doc/headers/mutex.html
 *
-* This exampel  was totally inspired by Anthony Williams lock-based data structures in
+* This example  was totally inspired by Anthony Williams lock-based data structures in
 * Ref: "C++ Concurrency In Action" http://www.manning.com/williams */

 #pragma once


Fixed memory leak

Fixed memory leak

svn path=/trunk/kdepim/; revision=271538

--- libkdepim/addressesdialog.cpp
+++ libkdepim/addressesdialog.cpp
@@ -872,11 +872,10 @@
 void
 AddressesDialog::addDistributionLists()
 {
-  KABC::DistributionListManager *manager =
-    new KABC::DistributionListManager( KABC::StdAddressBook::self() );
-  manager->load();
-
-  QStringList distLists = manager->listNames();
+  KABC::DistributionListManager manager( KABC::StdAddressBook::self() );
+  manager.load();
+
+  QStringList distLists = manager.listNames();
   if ( distLists.isEmpty() )
     return;

@@ -885,7 +884,7 @@

   QStringList::Iterator listIt;
   for ( listIt = distLists.begin(); listIt != distLists.end(); ++listIt ) {
-    KABC::DistributionList* dlist = manager->list( *listIt );
+    KABC::DistributionList* dlist = manager.list( *listIt );
     KABC::DistributionList::Entry::List entries = dlist->entries();

     AddresseeViewItem *item = new AddresseeViewItem( topItem, dlist->name() );


Missed a spot for including vector elements in FEInterface.

--- libmesh/src/fe/fe_interface.C
+++ libmesh/src/fe/fe_interface.C
@@ -352,7 +352,7 @@
 {
   const Order o = fe_t.order;

-  void_fe_switch(dofs_on_side(elem, o, s, di));
+  void_fe_with_vec_switch(dofs_on_side(elem, o, s, di));

   libmesh_error();
 }
@@ -428,7 +428,7 @@

 #endif

-  fe_switch(inverse_map(elem, p, tolerance, secure));
+  fe_with_vec_switch(inverse_map(elem, p, tolerance, secure));

   libmesh_error();
   return Point();


workaround

workaround

--- fnord-msg/MessageObject.cc
+++ fnord-msg/MessageObject.cc
@@ -150,6 +150,11 @@
 }

 bool MessageObject::asBool() const {
+  if (type == FieldType::UINT32) {
+    uint32_t val = *((uint32_t*) &data_);
+    return val > 0;
+  }
+
 #ifndef FNORD_NODEBUG
   if (type != FieldType::BOOLEAN) {
     RAISE(kTypeError);


Refcounting in PQAlloc

Refcounting in PQAlloc

--- libpqxx/include/pqxx/util.hxx
+++ libpqxx/include/pqxx/util.hxx
@@ -18,6 +18,7 @@
 #include "pqxx/libcompiler.h"
 #include "pqxx/config-public-libpq.h"

+#include <cassert>// DEBUG CODE
 #include <cstdio>
 #include <cctype>
 #include <sstream>
@@ -83,7 +84,6 @@

 /// The "null" oid
 const oid oid_none = 0;
-

 /// Dummy name, used by libpqxx in deliberate link errors
 /** If you get an error involving this function while building your program,
@@ -290,6 +290,9 @@
  */
 namespace internal
 {
+typedef unsigned long result_size_type;
+typedef long result_difference_type;
+
 /// C-style format strings for various built-in types
 /** @deprecated To be removed when ToString and FromString are taken out
  *
@@ -522,7 +525,7 @@
 void freepqmem(void *);
 void freenotif(PQXXPQ::PGnotify *);

-/// Keep track of a libpq-allocated pointer to be free()d automatically.
+/// Reference-counted smart pointer to libpq-allocated object
 /** Ownership policy is simple: object dies when PQAlloc object's value does.
  * If the available PostgreSQL development files supply PQfreemem() or
  * PQfreeNotify(), this is used to free the memory.  If not, free() is used
@@ -532,28 +535,32 @@
 template<typename T> class PQAlloc
 {
   T *m_Obj;
+  mutable const PQAlloc *m_l, *m_r;
 public:
   typedef T content_type;

-  PQAlloc() : m_Obj(0) {}
+  PQAlloc() throw () : m_Obj(0), m_l(this), m_r(this) {}
+  PQAlloc(const PQAlloc &rhs) throw () :
+    m_Obj(0), m_l(this), m_r(this) { makeref(rhs); }
+  ~PQAlloc() throw () { loseref(); }
+
+  PQAlloc &operator=(const PQAlloc &rhs) throw ()
+  	{ if (&rhs != this) { loseref(); makeref(rhs); } return *this; }

   /// Assume ownership of a pointer
-  explicit PQAlloc(T *obj) : m_Obj(obj) {}
-
-  ~PQAlloc() throw () { close(); }
-
-  /// Assume ownership of a pointer, freeing the previous one (if any)
-  /** If the new and the old pointer are identical, no action is performed.
+  /** @warning Don't to this more than once for a given object!
    */
+  explicit PQAlloc(T *obj) throw () : m_Obj(obj), m_l(this), m_r(this) {}
+
+  void swap(PQAlloc &rhs) throw ()
+  {
+    PQAlloc tmp(*this);
+    *this = rhs;
+    rhs = tmp;
+  }
+
   PQAlloc &operator=(T *obj) throw ()
-  {
-    if (obj != m_Obj)
-    {
-      close();
-      m_Obj = obj;
-    }
-    return *this;
-  }
+  	{ assert(!obj || obj != m_Obj); loseref(); makeref(obj); return *this; }

   /// Is this pointer non-null?
   operator bool() const throw () { return m_Obj != 0; }
@@ -580,18 +587,50 @@
    */
   T *c_ptr() const throw () { return m_Obj; }

+  void clear() throw () { loseref(); }
+
+private:
+  void makeref(T *p) throw ()
+  {
+    assert(m_l == this);
+    assert(m_r == this);
+    m_Obj = p;
+  }
+
+  void makeref(const PQAlloc &rhs) throw ()
+  {
+    m_l = &rhs;
+    m_r = rhs.m_r;
+    m_l->m_r = m_r->m_l = this;
+    m_Obj = rhs.m_Obj;
+  }
+
   /// Free and reset current pointer (if any)
-  void close() throw () { if (m_Obj) freemem(); m_Obj = 0; }
-
-private:
+  void loseref() throw ()
+  {
+    assert(m_r->m_l == this);
+    assert(m_l->m_r == this);
+    assert((m_l==this) == (m_r==this));
+
+    if (m_l == this && m_Obj) freemem();
+    m_Obj = 0;
+    m_l->m_r = m_r;
+    m_r->m_l = m_l;
+    m_l = m_r = this;
+  }
+
   void freemem() throw ()
   {
     freepqmem(m_Obj);
   }
-
-  PQAlloc(const PQAlloc &);		// Not allowed
-  PQAlloc &operator=(const PQAlloc &);	// Not allowed
 };
+
+
+/// Special version for result arrays, using PQclear()
+template<> inline void PQAlloc<PQXXPQ::PGresult>::freemem() throw ()
+{
+  PQclear(m_Obj);
+}

 /// Special version for notify structures, using PQfreeNotify() if available


fix hard replay problem

fix hard replay problem

--- libraries/chain/block_log.cpp
+++ libraries/chain/block_log.cpp
@@ -728,6 +728,9 @@
       ilog("Recovering Block Log...");
       EOS_ASSERT(fc::is_directory(data_dir) && fc::is_regular_file(data_dir / "blocks.log"), block_log_not_found,
                  "Block log not found in '${blocks_dir}'", ("blocks_dir", data_dir));
+
+      if (truncate_at_block == 0)
+         truncate_at_block = UINT32_MAX;

       auto now = fc::time_point::now();


Fixed compile problem on gcc 3.x.

Fixed compile problem on gcc 3.x.

--- test/test_Data_Object.cpp
+++ test/test_Data_Object.cpp
@@ -45,8 +45,10 @@
   ASSERT_EQUAL(Data_Type<Foo>::klass(), wrapped_foo.class_of());
   typedef void (*Mark_Func)(void *);
   typedef void (*Mark_Func_Foo)(Foo *);
-  ASSERT_EQUAL(
-      Mark_Func(Mark_Func_Foo(ruby_mark<Foo>)),
+  Mark_Func expected_mark_func =
+    Mark_Func(Mark_Func_Foo(ruby_mark<Foo>));
+  ASSERT_EQUAL(
+      expected_mark_func,
       RDATA(wrapped_foo.value())->dmark);
   ASSERT_EQUAL(
       RUBY_DATA_FUNC(Default_Allocation_Strategy<Foo>::free),
@@ -63,8 +65,10 @@
   ASSERT_EQUAL(Data_Type<Foo>::klass(), wrapped_foo.class_of());
   typedef void (*Mark_Func)(void *);
   typedef void (*Mark_Func_Foo)(Foo *);
-  ASSERT_EQUAL(
-      Mark_Func(Mark_Func_Foo(ruby_mark<Foo>)),
+  Mark_Func expected_mark_func =
+    Mark_Func(Mark_Func_Foo(ruby_mark<Foo>));
+  ASSERT_EQUAL(
+      expected_mark_func,
       RDATA(wrapped_foo.value())->dmark);
   ASSERT_EQUAL(
       RUBY_DATA_FUNC(Default_Allocation_Strategy<Foo>::free),
@@ -81,8 +85,10 @@
   ASSERT_EQUAL(rb_cObject, CLASS_OF(wrapped_foo.value()));
   typedef void (*Mark_Func)(void *);
   typedef void (*Mark_Func_Foo)(Foo *);
-  ASSERT_EQUAL(
-      Mark_Func(Mark_Func_Foo(ruby_mark<Foo>)),
+  Mark_Func expected_mark_func =
+    Mark_Func(Mark_Func_Foo(ruby_mark<Foo>));
+  ASSERT_EQUAL(
+      expected_mark_func,
       RDATA(wrapped_foo.value())->dmark);
   ASSERT_EQUAL(
       RUBY_DATA_FUNC(Default_Allocation_Strategy<Foo>::free),


Commit file accidentally left out of glc change for r8525

git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@8526 2bbb7eff-a529-9590-31e7-b0007b416f81

--- src/gpu/gl/GrGLTexture.cpp
+++ src/gpu/gl/GrGLTexture.cpp
@@ -34,8 +34,7 @@
         vp.fBottom = 0;
         vp.fHeight = textureDesc.fHeight;

-        fRenderTarget = SkNEW_ARGS(GrGLRenderTarget,
-                                   (gpu, *rtDesc, vp, fTexIDObj, this));
+        fRenderTarget.reset(SkNEW_ARGS(GrGLRenderTarget, (gpu, *rtDesc, vp, fTexIDObj, this)));
     }
 }


Fixed missing include in GPUFilter.cpp

Fixed missing include in GPUFilter.cpp

git-svn-id: f4e1a40f847802203273bde8e26df4d11611876a@4993 44470bb9-56e9-0310-a0f8-c586564d3dc6

--- src/graphics/GPUFilter.cpp
+++ src/graphics/GPUFilter.cpp
@@ -28,6 +28,7 @@
 #include "../base/MathHelper.h"

 #include <iostream>
+#include <string.h>

 using namespace std;


add tcp_simple test

add tcp_simple test

Signed-off-by: Hanoh Haim <1f34741bfa88280155d5053f5e8f4b89d8aa79bf@cisco.com>

--- src/gtest/bp_tcp_gtest.cpp
+++ src/gtest/bp_tcp_gtest.cpp
@@ -1536,6 +1536,18 @@
     delete lpt1;
 }

+TEST_F(gt_tcp, tst30_http_simple) {
+
+    CClientServerTcp *lpt1=new CClientServerTcp;
+
+    lpt1->Create("tcp2_http");
+
+    lpt1->simple_http();
+
+    lpt1->Delete();
+
+    delete lpt1;
+}


Character spacing when drawing a QPicture to a high DPI device.

Drawing some text into a QPicture, and then drawing that QPicture
to e.g. a QPrinter, would make the character spacing all wrong.
The old approach that tried to fix this adjusted the DPI of the
font that was used, so that the text size would be correct.
It seems this is not enough, since it will lay out the text
in the default resolution, and then scale that up, which may/may not
introduce errors.

Task-number: QTBUG-4974, 256481
Reviewed-by: Kim

--- src/gui/image/qpicture.cpp
+++ src/gui/image/qpicture.cpp
@@ -440,36 +440,6 @@
     return true;                                // no end-command
 }

-
-//
-// QFakeDevice is used to create fonts with a custom DPI
-//
-class QFakeDevice : public QPaintDevice
-{
-public:
-    QFakeDevice() { dpi_x = qt_defaultDpiX(); dpi_y = qt_defaultDpiY(); }
-    void setDpiX(int dpi) { dpi_x = dpi; }
-    void setDpiY(int dpi) { dpi_y = dpi; }
-    QPaintEngine *paintEngine() const { return 0; }
-    int metric(PaintDeviceMetric m) const
-    {
-        switch(m) {
-            case PdmPhysicalDpiX:
-            case PdmDpiX:
-                return dpi_x;
-            case PdmPhysicalDpiY:
-            case PdmDpiY:
-                return dpi_y;
-            default:
-                return QPaintDevice::metric(m);
-        }
-    }
-
-private:
-    int dpi_x;
-    int dpi_y;
-};
-
 /*!
   \internal
   Iterates over the internal picture data and draws the picture using
@@ -679,30 +649,29 @@

             if (d->formatMajor >= 9) {
                 s >> dbl;
-                QFont fnt(font);
-                if (dbl != 1.0) {
-                    QFakeDevice fake;
-                    fake.setDpiX(qRound(dbl*qt_defaultDpiX()));
-                    fake.setDpiY(qRound(dbl*qt_defaultDpiY()));
-                    fnt = QFont(font, &fake);
-                }
+                QFont fnt(font, painter->device());
+
+                qreal scale = painter->device()->logicalDpiY() / (dbl*qt_defaultDpiY());
+                painter->save();
+                painter->scale(1/scale, 1/scale);

                 qreal justificationWidth;
                 s >> justificationWidth;

                 int flags = Qt::TextSingleLine | Qt::TextDontClip | Qt::TextForceLeftToRight;

-                QSizeF size(1, 1);
+                QSizeF size(scale, scale);
                 if (justificationWidth > 0) {
-                    size.setWidth(justificationWidth);
+                    size.setWidth(justificationWidth*scale);
                     flags |= Qt::TextJustificationForced;
                     flags |= Qt::AlignJustify;
                 }

                 QFontMetrics fm(fnt);
-                QPointF pt(p.x(), p.y() - fm.ascent());
+                QPointF pt(p.x()*scale, p.y()*scale - fm.ascent());
                 qt_format_text(fnt, QRectF(pt, size), flags, /*opt*/0,
                                str, /*brect=*/0, /*tabstops=*/0, /*...*/0, /*tabarraylen=*/0, painter);
+                painter->restore();
             } else {
                 qt_format_text(font, QRectF(p, QSizeF(1, 1)), Qt::TextSingleLine | Qt::TextDontClip, /*opt*/0,
                                str, /*brect=*/0, /*tabstops=*/0, /*...*/0, /*tabarraylen=*/0, painter);


Crash when closing any top-level widget on Symbian.

The window surface must be deleted while the window is valid because on
some graphics systems a notifcation is sent to the window when the
surface is released.

This fix is also an optmization as we no longer process any backing
store requests while deleting the top-level. Previously it would
handle requests from the window itself and all its children.

Task-number: QT-2513
Reviewed-by: jbarron
(cherry picked from commit 34f1758428282a327c12b0d8040061c1f67ecc7f)

--- src/gui/kernel/qwidget.cpp
+++ src/gui/kernel/qwidget.cpp
@@ -1439,7 +1439,16 @@
     }
 #endif

-    if (QWidgetBackingStore *bs = d->maybeBackingStore()) {
+    if (d->extra && d->extra->topextra && d->extra->topextra->backingStore) {
+        // Okay, we are about to destroy the top-level window that owns
+        // the backing store. Make sure we delete the backing store right away
+        // before the window handle is invalid. This is important because
+        // the backing store will delete its window surface, which may or may
+        // not have a reference to this widget that will be used later to
+        // notify the window it no longer has a surface.
+        delete d->extra->topextra->backingStore;
+        d->extra->topextra->backingStore = 0;
+    } else if (QWidgetBackingStore *bs = d->maybeBackingStore()) {
         bs->removeDirtyWidget(this);
         if (testAttribute(Qt::WA_StaticContents))
             bs->removeStaticWidget(this);


HIR Typecheck Expr - Inferrence check for non-borrow coercion source

--- src/hir_typeck/expr_cs.cpp
+++ src/hir_typeck/expr_cs.cpp
@@ -4409,15 +4409,15 @@
             unsigned int count = 0;

             ::HIR::PathParams   pp { dst.clone() };
-            bool found = context.m_resolve.find_trait_impls(sp, lang_Unsize, pp, src, [&best_impl,&count](auto impl, bool fuzzy){
-                    DEBUG("[check_unsize_tys] Found impl " << impl << (fuzzy ? " (fuzzy)" : ""));
+            bool found = context.m_resolve.find_trait_impls(sp, lang_Unsize, pp, src, [&best_impl,&count](auto impl, auto cmp){
+                    DEBUG("[check_unsize_tys] Found impl " << impl << (cmp == ::HIR::Compare::Fuzzy ? " (fuzzy)" : ""));
                     if( impl.more_specific_than(best_impl) )
                     {
                         best_impl = mv$(impl);
                         count ++;
                     }
                     // TODO: Record the best impl (if fuzzy) and equate params
-                    return !fuzzy;
+                    return cmp != ::HIR::Compare::Fuzzy;
                     });
             if( found )
             {
@@ -5480,6 +5480,8 @@
                 TU_IFLET( ::HIR::TypeRef::Data, src.m_data, Borrow, se,
                     TU_IFLET( ::HIR::TypeRef::Data, dst.m_data, Borrow, de,
                     )
+                    else TU_IFLET( ::HIR::TypeRef::Data, dst.m_data, Pointer, de,
+                    )
                     else {
                         return true;
                     }
@@ -5657,13 +5659,14 @@
                 if( l.m_data.is_Borrow() )
                 {
                     const auto& le = l.m_data.as_Borrow();
-                    const auto& re = r.m_data.as_Borrow();
+                    ASSERT_BUG(sp, r.m_data.is_Borrow() || r.m_data.is_Pointer(), "Coerce source for borrow isn't a borrow/pointert - " << r);
+                    const auto& re_inner = r.m_data.is_Borrow() ? r.m_data.as_Borrow().inner : r.m_data.as_Pointer().inner;

                     // Dereference `*re.inner` until it isn't possible or it equals `*le.inner`
                     // - Repeat going the other direction.
-                    if( H::type_derefs_from(sp, context, *le.inner, *re.inner) )
+                    if( H::type_derefs_from(sp, context, *le.inner, *re_inner) )
                         return DedupKeep::Left;
-                    if( H::type_derefs_from(sp, context, *re.inner, *le.inner) )
+                    if( H::type_derefs_from(sp, context, *re_inner, *le.inner) )
                         return DedupKeep::Right;
                 }
                 return DedupKeep::Both;


Fix out of bounds memory read in GIFMovie.cpp am: 16882f7212 am: d2456e3a12 am: ffc0958605 am: df18259ff1 am: c9b947def7 am: 09ad23b21e am: 716de6b276
am: d1fb426850

Change-Id: I3bbc083f9f866642c78f02eabd801f789ac9ac2d

--- src/images/SkMovie_gif.cpp
+++ src/images/SkMovie_gif.cpp
@@ -122,7 +122,7 @@
                      int transparent, int width)
 {
     for (; width > 0; width--, src++, dst++) {
-        if (*src != transparent) {
+        if (*src != transparent && *src < cmap->ColorCount) {
             const GifColorType& col = cmap->Colors[*src];
             *dst = SkPackARGB32(0xFF, col.Red, col.Green, col.Blue);
         }


Finish ScanLimit()

Finish ScanLimit()

--- src/index/bwtree_index.cpp
+++ src/index/bwtree_index.cpp
@@ -203,24 +203,51 @@
  */
 BWTREE_TEMPLATE_ARGUMENTS
 void BWTREE_INDEX_TYPE::ScanLimit(
-    UNUSED_ATTRIBUTE const std::vector<type::Value> &value_list,
-    UNUSED_ATTRIBUTE const std::vector<oid_t> &tuple_column_id_list,
-    UNUSED_ATTRIBUTE const std::vector<ExpressionType> &expr_list,
+    const std::vector<type::Value> &value_list,
+    const std::vector<oid_t> &tuple_column_id_list,
+    const std::vector<ExpressionType> &expr_list,
     ScanDirectionType scan_direction,
     std::vector<ValueType> &result,
     const ConjunctionScanPredicate *csp_p,
     uint64_t limit,
     uint64_t offset) {
-  LOG_TRACE("ScanLimit() Point Query = %d; Full Scan = %d ",
-            csp_p->IsPointQuery(),
-            csp_p->IsFullIndexScan());
-
+
+  // Only work with limit == 1 and offset == 0
+  // Because that gets translated to "min"
+  // But still since we could not access tuples in the table
+  // the index just fetches the first qualified key without further checking
+  // including checking for non-exact bounds!!!
   if(csp_p->IsPointQuery() == false && \
      limit == 1 && \
      offset == 0 && \
      scan_direction == SCAN_DIRECTION_TYPE_FORWARD) {
-
-  }
+    const storage::Tuple *low_key_p = csp_p->GetLowKey();
+    const storage::Tuple *high_key_p = csp_p->GetHighKey();
+
+    LOG_TRACE("ScanLimit() special case (limit = 1; offset = 0; ASCENDING): %s",
+              low_key_p->GetInfo().c_str());
+
+    KeyType index_low_key;
+    KeyType index_high_key;
+    index_low_key.SetFromKey(low_key_p);
+    index_high_key.SetFromKey(high_key_p);
+
+    auto scan_itr = container.Begin(index_low_key);
+    if((scan_itr.IsEnd() == false) && \
+       (container.KeyCmpLessEqual(scan_itr->first, index_high_key))) {
+
+      result.push_back(scan_itr->second);
+    }
+  } else {
+    Scan(value_list,
+         tuple_column_id_list,
+         expr_list,
+         scan_direction,
+         result,
+         csp_p);
+  }
+
+  return;
 /*
   if (csp_p->IsPointQuery() == true) {
     const storage::Tuple *point_query_tuple_key_p = csp_p->GetPointQueryKey();


disable unnecessary ownership check

disable unnecessary ownership check

--- libsyndicate/libsyndicate.cpp
+++ libsyndicate/libsyndicate.cpp
@@ -2474,6 +2474,7 @@
    }

    // check owner
+   /*
    if( cert != NULL ) {
         if( msent->owner() != cert->user_id ) {

@@ -2490,6 +2491,7 @@
            rc = -EPERM;
        }
    }
+   */

    // if directory, check the MS's signature over the MS-maintained fields
    if( rc == 0 && msent->type() == MD_ENTRY_DIR ) {


Simplify range utilities

Simplify range utilities

--- libvast/vast/detail/range.hpp
+++ libvast/vast/detail/range.hpp
@@ -9,14 +9,6 @@

 template <typename Derived>
 class range {
-  Derived& derived() {
-    return static_cast<Derived&>(*this);
-  }
-
-  Derived const& derived() const {
-    return static_cast<Derived const&>(*this);
-  }
-
 public:
   explicit operator bool() const {
     return !empty();
@@ -27,7 +19,8 @@
   }

   bool empty() const {
-    return derived().begin() == derived().end();
+    auto d = static_cast<Derived const*>(this);
+    return d->begin() == d->end();
   }
 };

@@ -58,7 +51,7 @@
       rng_ = nullptr;
   }

-  auto dereference() const -> decltype(std::declval<Range>().dereference()) {
+  decltype(auto) dereference() const {
     return rng_->dereference();
   }

@@ -86,19 +79,7 @@
     return static_cast<Derived*>(this)->next();
   }

-#ifdef VAST_GCC
-// FIXME: The range_iterator uses the range (composition), but in the
-// definition of range_iterator, the call to
-// decltype(std::declval<Range>().dereference()) fails because the range has
-// not yet been befriended.
-//
-// As a workaround, we just make this method public. Clang doesn't complain.
-public:
-#endif
-  template <typename Hack = Derived>
-  auto dereference() const
-    -> decltype(std::declval<Hack>().state()) {
-    static_assert(std::is_same<Hack, Derived>::value, ":-P");
+  decltype(auto) dereference() const {
     return static_cast<Derived const*>(this)->state();
   }
 };


Fix a crash when painting is disabled. We would be passed NULL and it wasn't checking the correct value for this case.
Review URL: http://codereview.chromium.org/8767

git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@4281 4ff67af0-8c30-449e-8e8b-ad334ec8d88c


Add inline pass header for future use

Add inline pass header for future use

--- llpc/context/llpcCompiler.cpp
+++ llpc/context/llpcCompiler.cpp
@@ -40,6 +40,7 @@
 #include "llvm/Support/Mutex.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Support/Timer.h"
+#include "llvm/Transforms/IPO/AlwaysInliner.h"

 #include "LLVMSPIRVLib.h"
 #include "spirvExt.h"
@@ -1657,7 +1658,7 @@
     BinaryData elfBin = {};

     bool buildingRelocatableElf = CanUseRelocatableComputeShaderElf(&pPipelineInfo->cs);
-
+
     Result result = ValidatePipelineShaderInfo(&pPipelineInfo->cs);

     MetroHash::Hash cacheHash = {};


caches are now copyable

caches are now copyable

--- modules/utils/cache.hpp
+++ modules/utils/cache.hpp
@@ -137,24 +137,24 @@

   MultiCache(const boost::function<V(const K&)>& f, size_t c) : _fn(f), _capacity(c) {
     for(int i=0; i < omp_get_max_threads(); i++){
-      _caches.push_back(SingleCache<false, K, V>(f, c / omp_get_max_threads()));
+      _caches.push_back(PTR_LIB::make_shared<SingleCache<false, K, V>>(f, c / omp_get_max_threads()));
     }
   }

   // Obtain value of the cached function for k
   V operator()(const K& k) {
     SCOPED_TIMER
-    return _caches[omp_get_thread_num()](k);
+    return (*_caches[omp_get_thread_num()])(k);
   }

   uint64_t hits() const {
     int total_hits = 0;
-    for(size_t i=0; i<_caches.size(); i++) total_hits += _caches[i].hits();
+    for(size_t i=0; i<_caches.size(); i++) total_hits += _caches[i]->hits();
     return total_hits;
   }
   uint64_t misses() const {
     int total_misses = 0;
-    for(size_t i=0; i<_caches.size(); i++) total_misses += _caches[i].misses();
+    for(size_t i=0; i<_caches.size(); i++) total_misses += _caches[i]->misses();
     return total_misses;
   }

@@ -162,7 +162,7 @@

  private:

-  std::vector<SingleCache<false, K, V>> _caches;
+  std::vector< PTR_LIB::shared_ptr<SingleCache<false, K, V> > > _caches;
   const boost::function<V(const K&)> _fn;
   const size_t _capacity;
 };
@@ -176,43 +176,43 @@

   MultiRingCache(const boost::function<V(const K&)>& f, size_t c) : _fn(f), _capacity(c), _single_capacity(c / omp_get_max_threads()) {
     for(int i=0; i < omp_get_max_threads(); i++){
-      _caches.push_back(SingleCache<true, K, V>(f, _single_capacity));
+      _caches.push_back(PTR_LIB::make_shared<SingleCache<false, K, V>>(f, _single_capacity));
     }
   }

   // Obtain value of the cached function for k
   V operator()(const K& k) {
     SCOPED_TIMER
-    return _caches[(size_t)(k / _single_capacity) % omp_get_max_threads()](k);
+    return (*_caches[(size_t)(k / _single_capacity) % omp_get_max_threads()])(k);
   }

   uint64_t hits() const {
     int total_hits = 0;
-    for(size_t i=0; i<_caches.size(); i++) total_hits += _caches[i].hits();
+    for(size_t i=0; i<_caches.size(); i++) total_hits += _caches[i]->hits();
     return total_hits;
   }
   uint64_t misses() const {
     int total_misses = 0;
-    for(size_t i=0; i<_caches.size(); i++) total_misses += _caches[i].misses();
+    for(size_t i=0; i<_caches.size(); i++) total_misses += _caches[i]->misses();
     return total_misses;
   }

   uint64_t num_lookups() const {
     int total_lookups = 0;
-    for(size_t i=0; i<_caches.size(); i++) total_lookups += _caches[i].num_lookups();
+    for(size_t i=0; i<_caches.size(); i++) total_lookups += _caches[i]->num_lookups();
     return total_lookups;
   }

   double total_lookup_time()const {
     double lookup_time = 0;
-    for(size_t i=0; i<_caches.size(); i++) lookup_time += _caches[i].total_lookup_time();
+    for(size_t i=0; i<_caches.size(); i++) lookup_time += _caches[i]->total_lookup_time();
     return lookup_time;
   }

   uint64_t capacity() const { return _capacity; }

  private:
-  std::vector<SingleCache<true, K, V>> _caches;
+  std::vector< PTR_LIB::shared_ptr<SingleCache<false, K, V> > > _caches;
   const boost::function<V(const K&)> _fn;
   const size_t _capacity, _single_capacity;
 };
@@ -230,7 +230,7 @@

     _locks.resize(omp_get_max_threads());
     for(int i=0; i < omp_get_max_threads(); i++){
-      _caches.push_back(SingleCache<false, K, V>(f, _single_capacity));
+      _caches.push_back(PTR_LIB::make_shared<SingleCache<false, K, V>>(f, _single_capacity));
       omp_init_lock(&_locks[i]);
     }
   }
@@ -243,7 +243,7 @@
       size_t cache_idx = ((size_t)(k / _single_capacity)+i) % omp_get_max_threads();
       int lock_acquired = omp_test_lock(&_locks[cache_idx]);
       if(lock_acquired) {
-        V v = _caches[cache_idx](k);
+        V v = (*_caches[cache_idx])(k);
         omp_unset_lock(&_locks[cache_idx]);
         return v;
       }
@@ -251,7 +251,7 @@

     size_t cache_idx = ((size_t)(k / _single_capacity)) % omp_get_max_threads();
     omp_set_lock(&_locks[cache_idx]);
-    V v = _caches[cache_idx](k);
+    V v = (*_caches[cache_idx])(k);
     omp_unset_lock(&_locks[cache_idx]);

     // #pragma omp critical
@@ -261,19 +261,19 @@

   uint64_t hits() const {
     int total_hits = 0;
-    for(size_t i=0; i<_caches.size(); i++) total_hits += _caches[i].hits();
+    for(size_t i=0; i<_caches.size(); i++) total_hits += _caches[i]->hits();
     return total_hits;
   }

   uint64_t misses() const {
     int total_misses = 0;
-    for(size_t i=0; i<_caches.size(); i++) total_misses += _caches[i].misses();
+    for(size_t i=0; i<_caches.size(); i++) total_misses += _caches[i]->misses();
     return total_misses;
   }

   uint64_t num_lookups() const {
     int total_lookups = 0;
-    for(size_t i=0; i<_caches.size(); i++) total_lookups += _caches[i].num_lookups();
+    for(size_t i=0; i<_caches.size(); i++) total_lookups += _caches[i]->num_lookups();
     return total_lookups;
   }

@@ -285,7 +285,7 @@

  private:

-  std::vector<SingleCache<false, K, V> > _caches;
+  std::vector< PTR_LIB::shared_ptr<SingleCache<false, K, V> > > _caches;
   std::vector<omp_lock_t> _locks;

   const boost::function<V(const K&)> _fn;


main: fix writing to log file

main: fix writing to log file

--- frontend/main/src/main.cpp
+++ frontend/main/src/main.cpp
@@ -28,10 +28,10 @@
     // setup log
     megamol::core::utility::log::Log::DefaultLog.SetLevel(config.log_level);
     megamol::core::utility::log::Log::DefaultLog.SetEchoLevel(config.echo_level);
-    megamol::core::utility::log::Log::DefaultLog.SetLogFileName(config.log_file.data(), false);
     megamol::core::utility::log::Log::DefaultLog.SetOfflineMessageBufferSize(100);
     megamol::core::utility::log::Log::DefaultLog.SetMainTarget(
-        std::make_shared<megamol::core::utility::log::DefaultTarget>(megamol::core::utility::log::Log::LEVEL_ALL));
+        std::make_shared<megamol::core::utility::log::DefaultTarget>());
+    megamol::core::utility::log::Log::DefaultLog.SetLogFileName(config.log_file.data(), false);

     megamol::core::CoreInstance core;
     core.Initialise(false); // false makes core not start his own lua service (else we collide on default port)


Unit tests

Unit tests

--- test/unittests/morton.cpp
+++ test/unittests/morton.cpp
@@ -37,6 +37,13 @@
     ASSERT_EQ(z, 10);
     z = morton_encode2D(1, 3);
     ASSERT_EQ(z, 11);
+
+    // Diagonal, 2^0..2^29
+    for (int i = 0; i < 30; ++i)
+    {
+        z = morton_encode2D(2 << i, 2 << i);
+        ASSERT_EQ(z, (2 << i) * (2 << i) * 3);
+    }
 }

 TEST(Morton, Encode3D)


fix issues with rebase

fix issues with rebase

--- loader/test/test_provider.cpp
+++ loader/test/test_provider.cpp
@@ -40,10 +40,12 @@

     BatchFileReader reader(files[0]);
     for (int i=0; i<reader.itemCount()/2; i++ ) {
-        shared_ptr<vector<char>> data = reader.read();
-        shared_ptr<vector<char>> target = reader.read();
-        Buffer data_p(&(*data)[0],data->size());
-        Buffer target_p(&(*target)[0],target->size());
+        Buffer data_p(0);
+        reader.read(data_p);
+
+        Buffer target_p(0);
+        reader.read(target_p);
+
         BufferPair bp(&data_p, &target_p);
         media->provide_pair(0,&bp,&dbuffer[0],&tbuffer[0]);

@@ -148,7 +150,7 @@
             int reference_target = reference;
             int loaded_target = 0;
             provider<label_test::decoded, label_test::params> pp{lble, lblt, lbll, prm_fcty};
-            auto ls2 = pp.provide(labels_data, 4, (char *)(&loaded_target), 4, nullptr);
+            auto ls2 = pp.provide(labels._data, 4, (char *)(&loaded_target), 4, nullptr);
             EXPECT_EQ(ls2->scale, lstg->scale);
             EXPECT_EQ(ls2->shift, lstg->shift);
             EXPECT_EQ(reference_target, loaded_target);


TEST: Amend T_Xattr for Xattr::Has()

TEST: Amend T_Xattr for Xattr::Has()

--- test/unittests/t_xattr.cc
+++ test/unittests/t_xattr.cc
@@ -72,6 +72,7 @@
   ASSERT_TRUE(from_file2.IsValid());
   EXPECT_EQ(default_attrs + 1, from_file2->ListKeys().size());
   EXPECT_TRUE(from_file2->Get("user.test", &value));
+  EXPECT_TRUE(from_file2->Has("user.test"));
   EXPECT_EQ("value", value);

 #ifndef __APPLE__
@@ -84,10 +85,13 @@
   ASSERT_TRUE(from_file3.IsValid());
   EXPECT_EQ(default_attrs + 3, from_file3->ListKeys().size());
   EXPECT_TRUE(from_file3->Get("user.test", &value));
+  EXPECT_TRUE(from_file3->Has("user.test"));
   EXPECT_EQ("value", value);
   EXPECT_TRUE(from_file3->Get("user.test2", &value));
+  EXPECT_TRUE(from_file3->Has("user.test2"));
   EXPECT_EQ("value2", value);
   EXPECT_TRUE(from_file3->Get(long_string, &value));
+  EXPECT_TRUE(from_file3->Has(long_string));
   EXPECT_EQ(long_string, value);
 #endif
 }
@@ -106,10 +110,13 @@
   EXPECT_EQ(3U, xattr_list->ListKeys().size());
   string value;
   EXPECT_TRUE(xattr_list->Get("keya", &value));
+  EXPECT_TRUE(xattr_list->Has("keya"));
   EXPECT_EQ("valuea", value);
   EXPECT_TRUE(xattr_list->Get("keyb", &value));
+  EXPECT_TRUE(xattr_list->Has("keyb"));
   EXPECT_EQ("valueb", value);
   EXPECT_TRUE(xattr_list->Get("empty_key", &value));
+  EXPECT_TRUE(xattr_list->Has("empty_key"));
   EXPECT_EQ("", value);
 }

@@ -156,6 +163,14 @@
   EXPECT_TRUE(xl7.IsValid());

   free(buf);
+}
+
+
+TEST_F(T_Xattr, Has) {
+  string value;
+  EXPECT_TRUE(default_list.Has("keya"));
+  EXPECT_TRUE(default_list.Has("empty_key"));
+  EXPECT_FALSE(default_list.Has("not here"));
 }

@@ -224,9 +239,11 @@

 TEST_F(T_Xattr, Remove) {
   string value;
+  EXPECT_TRUE(default_list.Has("keya"));
   EXPECT_TRUE(default_list.Get("keya", &value));
   EXPECT_TRUE(default_list.Remove("keya"));
   EXPECT_FALSE(default_list.Get("keya", &value));
+  EXPECT_FALSE(default_list.Has("keya"));
   EXPECT_FALSE(default_list.Remove("keya"));
 }


HTE: relax validity condition when already valid (#17783)

The condition to get valid requires a low variance and test ratio. but
to stay valid, only the variance is required.

Co-authored-by: Daniel Agar <3d0f3b9ddcacec30c4008c5e030e6c13a478cb4f@agar.ca>

--- src/modules/mc_hover_thrust_estimator/MulticopterHoverThrustEstimator.cpp
+++ src/modules/mc_hover_thrust_estimator/MulticopterHoverThrustEstimator.cpp
@@ -172,8 +172,13 @@
 					_hover_thrust_ekf.fuseAccZ(-local_pos.az, -local_pos_sp.thrust[2]);
 				}

-				const bool valid = (_hover_thrust_ekf.getHoverThrustEstimateVar() < 0.001f)
-						   && (_hover_thrust_ekf.getInnovationTestRatio() < 1.f);
+				bool valid = (_hover_thrust_ekf.getHoverThrustEstimateVar() < 0.001f);
+
+				// The test ratio does not need to pass all the time to have a valid estimate
+				if (!_valid) {
+					valid = valid && (_hover_thrust_ekf.getInnovationTestRatio() < 1.f);
+				}
+
 				_valid_hysteresis.set_state_and_update(valid, local_pos.timestamp);
 				_valid = _valid_hysteresis.get_state();


fix(kernel/environment): binary file reader, force the file to be read in binary mode

We need this flag to be able to read the file on Windows.

Signed-off-by: Leonardo de Moura <7610bae85f2b530654cc716772f1fe653373e892@microsoft.com>

--- src/kernel/environment.cpp
+++ src/kernel/environment.cpp
@@ -553,7 +553,7 @@
 static char const * g_olean_header   = "oleanfile";
 static char const * g_olean_end_file = "EndFile";
 void environment_cell::export_objects(std::string const & fname) {
-    std::ofstream out(fname);
+    std::ofstream out(fname, std::ofstream::binary);
     serializer s(out);
     s << g_olean_header << LEAN_VERSION_MAJOR << LEAN_VERSION_MINOR;
     auto it  = begin_objects();
@@ -579,7 +579,7 @@

 bool environment_cell::load_core(std::string const & fname, io_state const & ios, optional<std::string> const & mod_name) {
     if (!mod_name || mark_imported_core(fname)) {
-        std::ifstream in(fname);
+        std::ifstream in(fname, std::ifstream::binary);
         if (!in.good())
             throw exception(sstream() << "failed to open file '" << fname << "'");
         deserializer d(in);


compile on ARM architectures

compile on ARM architectures

--- src/kognac/utils/utils.cpp
+++ src/kognac/utils/utils.cpp
@@ -1264,9 +1264,15 @@

 uint64_t Utils::getCPUCounter() {
 #if defined(__unix__) || defined(__unix) || defined(unix) || (defined(__APPLE__) && defined(__MACH__))
-    unsigned a, d;
-    __asm__ volatile("rdtsc" : "=a" (a), "=d" (d));
-    return ((uint64_t)a) | (((uint64_t)d) << 32);
+	#ifdef __i386__
+    		unsigned a, d;
+    		__asm__ volatile("rdtsc" : "=a" (a), "=d" (d));
+    		return ((uint64_t)a) | (((uint64_t)d) << 32);
+	#elif __aarch64__
+		return 0; //unsupported
+	#else
+		return 0; //unsupported
+	#endif
 #else
     return 0; //unsupported
 #endif


small cleanup: remove unnecessary semicolons (part 3)

The motivation for this change was seeing a few warnings generated by
the built-in static analysis tools while browsing the code in QtCreator.

This patch does not contain any functional changes.

Change-Id: Id5b0e9f9f34030e4ede2dc5d2d256d386086b716
Reviewed-on: http://gerrit.cloudera.org:8080/14847
Reviewed-by: Adar Dembo <866ca730bfc7f544e3ebce604ceeba4879f23df0@cloudera.com>
Tested-by: Kudu Jenkins

--- src/kudu/util/env_posix.cc
+++ src/kudu/util/env_posix.cc
@@ -29,6 +29,7 @@
 #include <ostream>
 #include <string>
 #include <type_traits>
+#include <utility>
 #include <vector>

 #include <gflags/gflags.h>
@@ -1194,7 +1195,7 @@
       result = IOError(fname, errno);
     }
     return result;
-  };
+  }

   virtual Status CreateDir(const string& name) OVERRIDE {
     TRACE_EVENT1("io", "PosixEnv::CreateDir", "path", name);
@@ -1205,7 +1206,7 @@
       result = IOError(name, errno);
     }
     return result;
-  };
+  }

   virtual Status DeleteDir(const string& name) OVERRIDE {
     TRACE_EVENT1("io", "PosixEnv::DeleteDir", "path", name);
@@ -1216,7 +1217,7 @@
       result = IOError(name, errno);
     }
     return result;
-  };
+  }

   Status GetCurrentWorkingDir(string* cwd) const override {
     TRACE_EVENT0("io", "PosixEnv::GetCurrentWorkingDir");


fix JS print => p() => console.log()

fix JS print => p() => console.log()

--- src/module/ExecutionEngine/JavaScript/JavaScript.cpp
+++ src/module/ExecutionEngine/JavaScript/JavaScript.cpp
@@ -33,7 +33,7 @@
 #include <v8.h>
 #endif

-#define LOG_FUNCTION_NAME "p"
+#define LOG_FUNCTION_NAME "console.log"

 extern "C" {


STYLE

STYLE

--- CartographicDBValidation/otbDSFuzzyModelEstimation.cxx
+++ CartographicDBValidation/otbDSFuzzyModelEstimation.cxx
@@ -137,7 +137,6 @@
   vdReProjFilterRL->Update();

-
   vdWriter->SetInput(vdReProjFilterRL->GetOutput());
   vdWriter->SetFileName(parseResult->GetParameterString("Output"));
   vdWriter->Update();


Make things more quiet by default

Make things more quiet by default

--- src/outer_limits/compute_optimal/compute_optimal.cxx
+++ src/outer_limits/compute_optimal/compute_optimal.cxx
@@ -74,6 +74,10 @@
         + ", initial points: " + std::to_string(initial_points.size()));
     }
   Outer_Parameters parameters(parameters_in);
+  if(parameters.verbosity != Verbosity::debug)
+    {
+      parameters.verbosity = Verbosity::none;
+    }

   const size_t rank(El::mpi::Rank()), num_procs(El::mpi::Size()),
     num_weights(normalization.size());
@@ -130,7 +134,7 @@
       El::Gemv(El::Orientation::NORMAL, El::BigFloat(1.0),
                yp_to_y_star.LockedMatrix(), yp_saved, El::BigFloat(0.0), y);

-      if(El::mpi::Rank() == 0 && parameters.verbosity >= Verbosity::regular)
+      if(El::mpi::Rank() == 0 && parameters_in.verbosity >= Verbosity::regular)
         {
           std::cout << "Loaded checkpoint " << backup_generation << "\n";
         }
@@ -164,13 +168,13 @@
           matrix_dimensions.insert(matrix_dimensions.end(),
                                    points.at(block).size(),
                                    function_blocks[block].size());
-          if(rank == 0 && parameters.verbosity >= Verbosity::debug)
+          if(rank == 0 && parameters_in.verbosity >= Verbosity::debug)
             {
               std::cout << "points: " << block << " " << points.at(block)
                         << "\n";
             }
         }
-      if(rank == 0 && parameters.verbosity >= Verbosity::regular)
+      if(rank == 0 && parameters_in.verbosity >= Verbosity::regular)
         {
           std::cout << "num_constraints: " << num_constraints << "\n";
         }
@@ -211,7 +215,7 @@
             && parameters.solver.duality_gap_threshold
                  > parameters_in.solver.duality_gap_threshold)
         {
-          if(rank == 0 && parameters.verbosity >= Verbosity::regular)
+          if(rank == 0 && parameters_in.verbosity >= Verbosity::regular)
             {
               std::cout << "Threshold: "
                         << parameters.solver.duality_gap_threshold << "\n";
@@ -222,7 +226,7 @@
             = solver.run(parameters.solver, parameters.verbosity,
                          parameter_properties, block_info, sdp, grid, timers);

-          if(rank == 0 && parameters.verbosity >= Verbosity::regular)
+          if(rank == 0 && parameters_in.verbosity >= Verbosity::regular)
             {
               set_stream_precision(std::cout);
               std::cout << "-----" << reason << "-----\n"
@@ -256,7 +260,7 @@
                    El::BigFloat(0.0), y);

           fill_weights(y, max_index, normalization, weights);
-          if(rank == 0 && parameters.verbosity >= Verbosity::regular)
+          if(rank == 0 && parameters_in.verbosity >= Verbosity::regular)
             {
               set_stream_precision(std::cout);
               std::cout << "weight: " << weights << "\n";
@@ -280,10 +284,11 @@
       El::DistMatrix<El::BigFloat, El::STAR, El::STAR> yp_star(
         solver.y.blocks.front());
       copy_matrix(yp_star, yp_saved);
-      save_checkpoint(parameters.solver.checkpoint_out, parameters.verbosity,
-                      yp_to_y_star, dual_objective_b_star, yp_saved, points,
-                      infinity, parameters.solver.duality_gap_threshold,
-                      primal_c_scale, backup_generation, current_generation);
+      save_checkpoint(parameters.solver.checkpoint_out,
+                      parameters_in.verbosity, yp_to_y_star,
+                      dual_objective_b_star, yp_saved, points, infinity,
+                      parameters.solver.duality_gap_threshold, primal_c_scale,
+                      backup_generation, current_generation);
     }
   return weights;
 }


clang-format it.

clang-format it.

--- tensorflow_lite_support/cc/test/task/processor/image_preprocessor_test.cc
+++ tensorflow_lite_support/cc/test/task/processor/image_preprocessor_test.cc
@@ -38,9 +38,9 @@
 namespace vision {
 namespace {

+using ::testing::ElementsAreArray;
 using ::testing::HasSubstr;
 using ::testing::Optional;
-using ::testing::ElementsAreArray;
 using ::tflite::support::kTfLiteSupportPayload;
 using ::tflite::support::StatusOr;
 using ::tflite::support::TfLiteSupportStatus;
@@ -56,54 +56,52 @@
     "tensorflow_lite_support/cc/test/testdata/task/vision/dilated_conv.tflite";

 StatusOr<ImageData> LoadImage(std::string image_name) {
-  return DecodeImageFromFile(JoinPath("./" /*test src dir*/,
-                                      kTestDataDirectory, image_name));
+  return DecodeImageFromFile(
+      JoinPath("./" /*test src dir*/, kTestDataDirectory, image_name));
 }

 class DynamicInputTest : public tflite_shims::testing::Test {
-    public:
-        void SetUp()
-        {
-            engine = absl::make_unique<TfLiteEngine>();
-            engine->BuildModelFromFile(kModelPath);
-            engine->InitInterpreter();
+ public:
+  void SetUp() {
+    engine = absl::make_unique<TfLiteEngine>();
+    engine->BuildModelFromFile(kModelPath);
+    engine->InitInterpreter();

-            ASSERT_OK_AND_ASSIGN(preprocessor， processor::ImagePreprocessor::Create(
-                engine.get(), {0}));
-        }
-    private:
-        std::unique_ptr<ImagePreprocessor> preprocessor;
-        std::unique_ptr<TfLiteEngine> engine;
+    ASSERT_OK_AND_ASSIGN(
+        preprocessor， processor::ImagePreprocessor::Create(engine.get(), {0}));
+  }
+
+ private:
+  std::unique_ptr<ImagePreprocessor> preprocessor;
+  std::unique_ptr<TfLiteEngine> engine;
 };

-// See if input tensor dims signature for height and width is -1
+// See if input tensor dims signature for height and width is -1
 // because it is so in the model.
-TEST_F(DynamicInputTest, InputHeightAndWidthMutable)
-{
-    const TfLiteIntArray* input_dims_signature =
-        preprocessor->Tensor()->dims_signature;
-    EXPECT_EQ(input_dims_signature->data[1], -1);
-    EXPECT_EQ(input_dims_signature->data[2], -1);
+TEST_F(DynamicInputTest, InputHeightAndWidthMutable) {
+  const TfLiteIntArray* input_dims_signature =
+      preprocessor->Tensor()->dims_signature;
+  EXPECT_EQ(input_dims_signature->data[1], -1);
+  EXPECT_EQ(input_dims_signature->data[2], -1);
 }

 // See if output tensor has been re-dimmed as per the input
 // tensor.
-TEST_F(DynamicInputTest, OutputHeightAndWidthMutable)
-{
-    SUPPORT_ASSERT_OK_AND_ASSIGN(ImageData image, LoadImage("burger.jpg"));
-    std::unique_ptr<FrameBuffer> image_frame_buffer = CreateFromRgbRawBuffer(
-        image.pixel_data, FrameBuffer::Dimension{image.width, image.height});
+TEST_F(DynamicInputTest, OutputHeightAndWidthMutable) {
+  SUPPORT_ASSERT_OK_AND_ASSIGN(ImageData image, LoadImage("burger.jpg"));
+  std::unique_ptr<FrameBuffer> image_frame_buffer = CreateFromRgbRawBuffer(
+      image.pixel_data, FrameBuffer::Dimension{image.width, image.height});

-    preprocessor->Preprocess(image_frame_buffer);
-    const TFLiteIntArray* output_dims = engine->GetOutputs()[0]->dims;
-
-    const size_t input_height = Tensor()->dims->data[1];
-    const size_t input_width = Tensor()->dims->data[2];
-    const size_t output_height = output_dims->data[1];
-    const size_t output_width = output_dims->data[2];
-
-    EXPECT_EQ(input_height, output_height);
-    EXPECT_EQ(input_width, output_width);
+  preprocessor->Preprocess(image_frame_buffer);
+  const TFLiteIntArray* output_dims = engine->GetOutputs()[0]->dims;
+
+  const size_t input_height = Tensor()->dims->data[1];
+  const size_t input_width = Tensor()->dims->data[2];
+  const size_t output_height = output_dims->data[1];
+  const size_t output_width = output_dims->data[2];
+
+  EXPECT_EQ(input_height, output_height);
+  EXPECT_EQ(input_width, output_width);
 }
 }  // namespace
 }  // namespace vision


OsmAnnotate: dead code

OsmAnnotate: dead code

--- src/plugins/render/osmannotate/OsmAnnotatePlugin.cpp
+++ src/plugins/render/osmannotate/OsmAnnotatePlugin.cpp
@@ -478,9 +478,6 @@
         PlacemarkTextAnnotation* t = new PlacemarkTextAnnotation( placemark );
         m_marbleWidget->model()->treeModel()->addFeature( m_AnnotationDocument, placemark );
         m_graphicsItems.append( t );
-
-        //FIXME only repaint the new placemark
-        ( ( MarbleWidget* ) watched)->update();
         emit placemarkAdded();
         return true;
     }


update error message

update error message

--- src/libmd2qm/statesaver.cc
+++ src/libmd2qm/statesaver.cc
@@ -26,7 +26,7 @@
     if (mode == 'w') {_out.open( file.c_str(),ios::binary|ios::out);}
     else if (mode == 'r') {_in.open(file.c_str(), ios::in | ios::binary);}
     else {
-        throw runtime_error(string("Open mode not available" ) + mode );
+        throw runtime_error(string("Open mode not available: " ) + mode );
     }
 }


fix(library/module_mgr): set up message handling outside of exception handler

--- src/library/module_mgr.cpp
+++ src/library/module_mgr.cpp
@@ -190,19 +190,19 @@
     if (auto & existing_mod = m_modules[id])
         if (!existing_mod->m_out_of_date) return;

+    scope_global_ios scope_ios(m_ios);
+    scoped_message_buffer scoped_msg_buf(m_msg_buf);
+    scoped_task_context scope_task_ctx(id, {1, 0});
+    message_bucket_id bucket_id { id, m_current_period };
+    scope_message_context scope_msg_ctx(bucket_id);
+    scope_traces_as_messages scope_trace_msgs(id, {1, 0});
+
     try {
         auto orig_module_stack = module_stack;
         if (module_stack.contains(id)) {
             throw exception(sstream() << "cyclic import: " << id);
         }
         module_stack.insert(id);
-
-        scope_global_ios scope_ios(m_ios);
-        scoped_message_buffer scoped_msg_buf(m_msg_buf);
-        scoped_task_context scope_task_ctx(id, {1, 0});
-        message_bucket_id bucket_id { id, m_current_period };
-        scope_message_context scope_msg_ctx(bucket_id);
-        scope_traces_as_messages scope_trace_msgs(id, {1, 0});

         bool already_have_lean_version = m_modules[id] && m_modules[id]->m_source == module_src::LEAN;


adds acc_enable pin as tivagpio.

adds acc_enable pin as tivagpio.

--- boards/ti-bracz-cs-connected/HwInit.cxx
+++ boards/ti-bracz-cs-connected/HwInit.cxx
@@ -119,6 +119,7 @@
 void hw_set_to_safe(void)
 {
     dcc_hw.disable_output();
+    AccHwDefs::ACC_ENABLE_Pin::hw_set_to_safe();
 }

 /** Blink LED */
@@ -244,8 +245,8 @@
     dcc_hw.hw_init();
     disable_dcc();

-    // A4 controls the accessory bus, active high.
-    set_gpio_drive_low(GPIO_PORTA_BASE, GPIO_PIN_4);
+    // controls the accessory bus.
+    AccHwDefs::ACC_ENABLE_Pin::hw_set_to_safe();

     /* Setup the system clock. */
     MAP_SysCtlClockFreqSet(SYSCTL_XTAL_25MHZ | SYSCTL_USE_PLL |


noise-cancel concept test

noise-cancel concept test

--- noise-cancel-test1.cpp
+++ noise-cancel-test1.cpp
@@ -35,6 +35,7 @@
 	// just get this much working.

 	// where does fft Get its freq values from???
+	// oh: "sum.toArray()."

 	auto fft = Aquila::FftFactory::getFft(SIZE);
 	Aquila::SpectrumType spectrum = fft->fft(sum.toArray());
@@ -51,9 +52,9 @@

 	std::transform(
 		std::begin(spectrum),
-		std::end(spectrum),
-		std::begin(inverse),
-		std::begin(spectrum),
+		std::end(spectrum), // is this really the most efficient
+		std::begin(inverse),// way of multiplying a spectrum by -1?
+		std::begin(spectrum),// most likely not.
 		[] (Aquila::ComplexType x, Aquila::ComplexType y) {return x * y}
 	);
 	plt.setTitle("Flipped Signal");


updated enrichment tests for 32 bit, fixes #776

--- tests/enrichment_tests.cc
+++ tests/enrichment_tests.cc
@@ -88,5 +88,5 @@
   double product_qty = cyclus::enrichment::UraniumQty(mat_);
   EXPECT_DOUBLE_EQ(feed_qty_, FeedQty(product_qty, assays));
   EXPECT_DOUBLE_EQ(tails_qty_, TailsQty(product_qty, assays));
-  EXPECT_DOUBLE_EQ(swu_, SwuRequired(product_qty, assays));
+  EXPECT_NEAR(swu_, SwuRequired(product_qty, assays), 1e-8);
 }


JavaHL: Follow up r24248.  Set svn:eol-style and adjust copyright years.

[ in subversion/bindings/java/javahl/ ]
* native/LogMessageCallback.h,
  src/org/tigris/subversion/javahl/LogMessageCallback.java:
  Set svn:eol-style to native.

* native/LogMessageCallback.cpp:
  Set svn:eol-style to native, and adjust copyright year.

--- subversion/bindings/java/javahl/native/LogMessageCallback.cpp
+++ subversion/bindings/java/javahl/native/LogMessageCallback.cpp
@@ -1,7 +1,7 @@
 /**
  * @copyright
  * ====================================================================
- * Copyright (c) 2003-2006 CollabNet.  All rights reserved.
+ * Copyright (c) 2007 CollabNet.  All rights reserved.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution.  The terms


rely on KFileDialog for automatically adding extension

Otherwise there are two checkboxes, and since it's difficult to get
at the KFileDialog one, just assume it does the right thing (which
additionally makes it consistent with other KDE apps).

--- fpicker/source/unx/kde4/KDE4FilePicker.cxx
+++ fpicker/source/unx/kde4/KDE4FilePicker.cxx
@@ -248,20 +248,6 @@
     QStringList rawFiles = _dialog->selectedFiles();
     QStringList files;

-    // check if we need to add an extension
-    QString extension = "";
-    if ( _dialog->operationMode() == KFileDialog::Saving )
-    {
-        QCheckBox *cb = dynamic_cast<QCheckBox*> (
-            _customWidgets[ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION ]);
-
-        if (cb && cb->isChecked())
-        {
-            extension = _dialog->currentFilter(); // assuming filter value is like this *.ext
-            extension.replace("*","");
-        }
-    }
-
     // Workaround for the double click selection KDE4 bug
     // kde file picker returns the file and directories for selectedFiles()
     // when a file is double clicked
@@ -288,12 +274,7 @@

             if (singleFile)
                 filename.prepend(dir + "/");
-
-            //prevent extension append if we already have one
-            if (filename.endsWith(extension))
-                files.append(filename);
-            else
-                files.append(filename + extension);
+            files.append(filename);
         }
     }

@@ -381,6 +362,9 @@
         switch (controlId)
         {
             case ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION:
+            // we actually rely on KFileDialog and ignore CHECKBOX_AUTOEXTENSION completely,
+            // otherwise the checkbox would be duplicated
+                break;
             case ExtendedFilePickerElementIds::CHECKBOX_PASSWORD:
             case ExtendedFilePickerElementIds::CHECKBOX_FILTEROPTIONS:
             case ExtendedFilePickerElementIds::CHECKBOX_READONLY:
@@ -417,6 +401,10 @@
         switch (controlId)
         {
             case ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION:
+            // we ignore this one and rely on KFileDialog to provide the function,
+            // always return true, here meaning "it's been taken care of"
+                res = uno::Any( true );
+                break;
             case ExtendedFilePickerElementIds::CHECKBOX_PASSWORD:
             case ExtendedFilePickerElementIds::CHECKBOX_FILTEROPTIONS:
             case ExtendedFilePickerElementIds::CHECKBOX_READONLY:
@@ -463,7 +451,7 @@
     {
         switch (controlId)
         {
-            case ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION:
+            case ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION: // ignored
             case ExtendedFilePickerElementIds::CHECKBOX_PASSWORD:
             case ExtendedFilePickerElementIds::CHECKBOX_FILTEROPTIONS:
             case ExtendedFilePickerElementIds::CHECKBOX_READONLY:
@@ -498,7 +486,7 @@
     {
         switch (controlId)
         {
-            case ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION:
+            case ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION: // ignored
             case ExtendedFilePickerElementIds::CHECKBOX_PASSWORD:
             case ExtendedFilePickerElementIds::CHECKBOX_FILTEROPTIONS:
             case ExtendedFilePickerElementIds::CHECKBOX_READONLY:
@@ -591,6 +579,10 @@
             }

             widget = new QCheckBox(label, _extraControls);
+            // the checkbox is created even for CHECKBOX_AUTOEXTENSION to simplify
+            // code, but the checkbox is hidden and ignored
+            if( controlId == ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION )
+                widget->hide();

             break;
         }
@@ -654,13 +646,12 @@

         case FILESAVE_AUTOEXTENSION:
             operationMode = KFileDialog::Saving;
-            //addCustomControl( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION );
+            addCustomControl( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION );
             break;

         case FILESAVE_AUTOEXTENSION_PASSWORD:
         {
             operationMode = KFileDialog::Saving;
-            //addCustomControl( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION );
             addCustomControl( ExtendedFilePickerElementIds::CHECKBOX_PASSWORD );
             break;
         }
@@ -680,6 +671,7 @@

         case FILESAVE_AUTOEXTENSION_TEMPLATE:
             operationMode = KFileDialog::Saving;
+            addCustomControl( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION );
             addCustomControl( ExtendedFilePickerElementIds::LISTBOX_TEMPLATE );
             break;


fix large spacing problem

fix large spacing problem

--- examples/GuiClient/profileDialog.cpp
+++ examples/GuiClient/profileDialog.cpp
@@ -110,7 +110,7 @@
                           arg(m_time[resource].tzo());

         if(i < resources.count() - 1) // skip for the last item
-            statusText += "

";
+            statusText += "
";
     }
     setStatusText(statusText);
 }


Add a valid comparator for sorting saved model signature names.

The comparator previously is not a valid comparator i.e.
if a < b, b < c !=> a < c

Example:
[feeds:src_encs:00, feeds:src_enc_paddings:00, feeds:num_hyps:00]
[feeds:src_encs:00, feeds:num_hyps:00, feeds:src_enc_paddings:00] both are sorted according to the comparator.
PiperOrigin-RevId: 374502051
Change-Id: I90b977f28f95599367d581313772a57b7ff41471

--- tensorflow/compiler/mlir/tensorflow/translate/import_model.cc
+++ tensorflow/compiler/mlir/tensorflow/translate/import_model.cc
@@ -105,7 +105,6 @@
 #include "tensorflow/core/lib/core/errors.h"
 #include "tensorflow/core/lib/strings/str_util.h"
 #include "tensorflow/core/platform/errors.h"
-#include "tensorflow/core/platform/fingerprint.h"
 #include "tensorflow/core/platform/path.h"
 #include "tensorflow/core/platform/protobuf.h"
 #include "tensorflow/core/platform/types.h"
@@ -3715,14 +3714,12 @@
   std::vector<std::pair<std::string, TensorInfo>> inputs(
       signature_def.inputs().begin(), signature_def.inputs().end());
   llvm::sort(inputs, [](const auto& lhs, const auto& rhs) {
-    return tensorflow::Fingerprint64(lhs.first) <
-           tensorflow::Fingerprint64(rhs.first);
+    return lhs.first.size() < rhs.first.size() || lhs.first > rhs.first;
   });
   std::vector<std::pair<std::string, TensorInfo>> outputs(
       signature_def.outputs().begin(), signature_def.outputs().end());
   llvm::sort(outputs, [](const auto& lhs, const auto& rhs) {
-    return tensorflow::Fingerprint64(lhs.first) <
-           tensorflow::Fingerprint64(rhs.first);
+    return lhs.first.size() < rhs.first.size() || lhs.first > rhs.first;
   });

   std::unordered_map<std::string, std::string> tf_name_to_mlir_name;


INTEGRATION: CWS ooo19126 (1.2.494); FILE MERGED 2005/09/05 13:05:11 rt 1.2.494.1: #i54170# Change license header: remove SISSL

--- framework/inc/services/detectorfactory.hxx
+++ framework/inc/services/detectorfactory.hxx
@@ -1,61 +1,35 @@
 /*************************************************************************
  *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
  *  $RCSfile: detectorfactory.hxx,v $
  *
- *  $Revision: 1.2 $
- *
- *  last change: $Author: hr $ $Date: 2003-04-04 16:02:24 $
- *
- *  The Contents of this file are made available subject to the terms of
- *  either of the following licenses
- *
- *         - GNU Lesser General Public License Version 2.1
- *         - Sun Industry Standards Source License Version 1.1
- *
- *  Sun Microsystems Inc., October, 2000
- *
- *  GNU Lesser General Public License Version 2.1
- *  =============================================
- *  Copyright 2000 by Sun Microsystems, Inc.
- *  901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License version 2.1, as published by the Free Software Foundation.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- *  MA  02111-1307  USA
- *
- *
- *  Sun Industry Standards Source License Version 1.1
- *  =================================================
- *  The contents of this file are subject to the Sun Industry Standards
- *  Source License Version 1.1 (the "License"); You may not use this file
- *  except in compliance with the License. You may obtain a copy of the
- *  License at http://www.openoffice.org/license.html.
- *
- *  Software provided under this License is provided on an "AS IS" basis,
- *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- *  See the License for the specific provisions governing your rights and
- *  obligations concerning the Software.
- *
- *  The Initial Developer of the Original Code is: Sun Microsystems, Inc.
- *
- *  Copyright: 2000 by Sun Microsystems, Inc.
- *
- *  All Rights Reserved.
- *
- *  Contributor(s): _______________________________________
- *
+ *  $Revision: 1.3 $
+ *
+ *  last change: $Author: rt $ $Date: 2005-09-09 00:29:16 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
  *
  ************************************************************************/


INTEGRATION: CWS licensing1 (1.6.60); FILE MERGED 2005/03/02 11:20:42 lo 1.6.60.2: RESYNC: (1.6-1.7); FILE MERGED 2005/02/11 15:32:22 cd 1.6.60.1: #118903# New callback for menu extensions

--- framework/inc/uielement/menubarmanager.hxx
+++ framework/inc/uielement/menubarmanager.hxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: menubarmanager.hxx,v $
  *
- *  $Revision: 1.9 $
- *
- *  last change: $Author: vg $ $Date: 2005-03-23 14:11:03 $
+ *  $Revision: 1.10 $
+ *
+ *  last change: $Author: rt $ $Date: 2005-03-29 15:48:16 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -280,6 +280,7 @@
         void             CreatePicklistArguments(
                             ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgsList,
                             const MenuItemHandler* );
+        void             CheckAndAddMenuExtension( Menu* pMenu );
         static void      impl_RetrieveShortcutsFromConfiguration( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration >& rAccelCfg,
                                                                   const ::com::sun::star::uno::Sequence< rtl::OUString >& rCommands,
                                                                   std::vector< MenuItemHandler* >& aMenuShortCuts );


Update iBurnMgrStart.cpp

Update iBurnMgrStart.cpp

--- iBurnMgr/iBurnMgrStart.cpp
+++ iBurnMgr/iBurnMgrStart.cpp
@@ -2,7 +2,7 @@
 * iBurnMgrStart.cpp
 * Note: iBurnMgr iBurnMgrStart
 * E-mail:<forcemz@outlook.com>
-* Data: @2015.03
+* Date: @2015.03
 * Copyright (C) 2015 The ForceStudio All Rights Reserved.
 **********************************************************************************************************/
 #include "Precompiled.h"
@@ -46,4 +46,4 @@
 	::CoUninitialize();
 	_Module.Term();
 	return dwExit;
-}+}


stop passing non-existing arguments to the maliit server from example app

--- examples/apps/plainqt/mainwindow.cpp
+++ examples/apps/plainqt/mainwindow.cpp
@@ -173,19 +173,10 @@

 void MainWindow::onStartServerClicked()
 {
-
-    QStringList arguments;
-    arguments << "-bypass-wm-hint";
-
-    // Self-compositing is currently only supported in fullscreen mode:
-    if (enableFullScreenMode()) {
-        arguments << "-use-self-composition";
-    }
-
     if (m_server_process->state() != QProcess::NotRunning) {
         m_server_process->terminate();
     } else {
-        m_server_process->start(serverName, arguments);
+        m_server_process->start(serverName, QStringList());
     }
 }


INTEGRATION: CWS toolbars4 (1.4.8); FILE MERGED 2005/03/07 15:49:58 cd 1.4.8.1: #i44348# Set no close flag for important toolbars

--- framework/inc/uielement/toolbarwrapper.hxx
+++ framework/inc/uielement/toolbarwrapper.hxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: toolbarwrapper.hxx,v $
  *
- *  $Revision: 1.4 $
+ *  $Revision: 1.5 $
  *
- *  last change: $Author: kz $ $Date: 2005-03-01 19:31:31 $
+ *  last change: $Author: obo $ $Date: 2005-03-15 09:33:35 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -141,6 +141,9 @@
     //-------------------------------------------------------------------------------------------------------------
     //  protected methods
     //-------------------------------------------------------------------------------------------------------------
+    protected:
+        virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const com::sun::star::uno::Any&  aValue ) throw( com::sun::star::uno::Exception );
+
     private:
         com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >    m_xServiceManager;
         com::sun::star::uno::Reference< com::sun::star::lang::XComponent >              m_xToolBarManager;


INTEGRATION: CWS ooo19126 (1.3.128); FILE MERGED 2005/09/05 13:05:38 rt 1.3.128.1: #i54170# Change license header: remove SISSL

--- framework/inc/uifactory/toolboxfactory.hxx
+++ framework/inc/uifactory/toolboxfactory.hxx
@@ -1,61 +1,35 @@
 /*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
  *
  *  $RCSfile: toolboxfactory.hxx,v $
  *
- *  $Revision: 1.3 $
+ *  $Revision: 1.4 $
  *
- *  last change: $Author: kz $ $Date: 2005-03-01 19:33:27 $
+ *  last change: $Author: rt $ $Date: 2005-09-09 00:50:37 $
  *
- *  The Contents of this file are made available subject to the terms of
- *  either of the following licenses
- *
- *         - GNU Lesser General Public License Version 2.1
- *         - Sun Industry Standards Source License Version 1.1
- *
- *  Sun Microsystems Inc., October, 2000
- *
- *  GNU Lesser General Public License Version 2.1
- *  =============================================
- *  Copyright 2000 by Sun Microsystems, Inc.
- *  901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License version 2.1, as published by the Free Software Foundation.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- *  MA  02111-1307  USA
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
  *
  *
- *  Sun Industry Standards Source License Version 1.1
- *  =================================================
- *  The contents of this file are subject to the Sun Industry Standards
- *  Source License Version 1.1 (the "License"); You may not use this file
- *  except in compliance with the License. You may obtain a copy of the
- *  License at http://www.openoffice.org/license.html.
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
  *
- *  Software provided under this License is provided on an "AS IS" basis,
- *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- *  See the License for the specific provisions governing your rights and
- *  obligations concerning the Software.
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
  *
- *  The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
  *
- *  Copyright: 2000 by Sun Microsystems, Inc.
- *
- *  All Rights Reserved.
- *
- *  Contributor(s): _______________________________________
- *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
  *
  ************************************************************************/