commit
stringlengths
40
40
old_file
stringlengths
4
264
new_file
stringlengths
4
264
old_contents
stringlengths
0
4.24k
new_contents
stringlengths
1
5.44k
subject
stringlengths
14
778
message
stringlengths
15
9.92k
lang
stringclasses
277 values
license
stringclasses
13 values
repos
stringlengths
5
127k
972f763385e73e7838fb671164f105378139ef17
src/InputArgs.cpp
src/InputArgs.cpp
// Standard headers #include "InputArgs.hpp" InputArgs::InputArgs(int argc, char const *const *argv) : argstream(argv, argv + argc) { read_input(); process_input(); } void InputArgs::process_input() { if (n_threads == 0) n_threads = std::thread::hardware_concurrency(); } void InputArgs::read_input() { ...
// Standard headers #include "InputArgs.hpp" InputArgs::InputArgs(int argc, char const *const *argv) : argstream(argv, argv + argc) { read_input(); process_input(); } void InputArgs::process_input() { if (n_threads == 0) n_threads = std::thread::hardware_concurrency(); } void InputArgs::read_input() { ...
Correct check of number of arguments
Correct check of number of arguments
C++
apache-2.0
renatocf/MAC0438-EP2,renatocf/MAC0438-EP2
bbb4ae99d81b580e664e84890a95335f58fbf3c7
misc_util.cpp
misc_util.cpp
#include "misc_util.h" namespace dlib { void string_fmt_time(std::string& ret) { time_t now = time(NULL); struct tm *t = localtime(&now); while(!strftime((char *)ret.data(), ret.capacity(), "%Y:%m:%d %H:%M", t)) ret.reserve(ret.size() << 1); } }
#include "misc_util.h" namespace dlib { void string_fmt_time(std::string& ret) { time_t now = time(NULL); struct tm *t = localtime(&now); while(!strftime((char *)ret.data(), ret.capacity(), "%Y:%m:%d %H:%M", t)) ret.reserve(ret.capacity() ? ret.capacity() << 1: 16); } }
Fix mistake of using size instead of capacity.
Fix mistake of using size instead of capacity.
C++
mit
noseatbelts/dlib,noseatbelts/dlib
47356780b93c6dc102e1f4b3db6671f51937cc79
compress_huffman/main.cpp
compress_huffman/main.cpp
#include <iostream> #include <fstream> #include "huffman.hpp" using namespace algorithm; static enum { E_SUCCESS = 0, E_ARGUMENT_NOT_PROVIDED, E_FILE_NOT_FOUND, } StatusType; int main(const int argc, const char * argv[]) { if(argc < 2) { fprintf(stderr, "Usage: %s [file name]\n", argv[0])...
#include <iostream> #include <fstream> #include "include/huffman.hpp" using namespace algorithm; static enum { E_SUCCESS = 0, E_ARGUMENT_NOT_PROVIDED, E_FILE_NOT_FOUND, } StatusType; int main(const int argc, const char * argv[]) { if(argc < 2) { fprintf(stderr, "Usage: %s [file name]\n", ...
Fix the path of header file
Fix the path of header file
C++
mit
kdzlvaids/algorithm_and_practice-pknu-2016,kdzlvaids/algorithm_and_practice-pknu-2016
a0ec58186922766c6fcc0488b0241312d028e4e0
src/ish.cpp
src/ish.cpp
int main(int argc, char **argv) { return 0; }
#include <sys/types.h> #include <sys/wait.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sysexits.h> #include <unistd.h> char* getinput(char *buffer, size_t buflen) { printf("$$ "); return fgets(buffer, buflen, stdin); } int main(int argc, char **argv) { char buf[1024...
Add execution of simple programs
Add execution of simple programs
C++
isc
simplyianm/ish
11e7fc234e49a5920f2575e795908d631e2f9c20
questions/lambda-list-37615204/main.cpp
questions/lambda-list-37615204/main.cpp
// https://github.com/KubaO/stackoverflown/tree/master/questions/lambda-list-37615204 #include <QtWidgets> class Widget : public QWidget { struct Buyable { void buy(int) const {} }; QList<Buyable> m_list; QList<QList<QWidget*>> m_widgets; int m_amountMultiplier = 2; public: Widget() { aut...
// https://github.com/KubaO/stackoverflown/tree/master/questions/lambda-list-37615204 #include <QtWidgets> struct Building { void buy() {} }; class Class : public QObject { QList<Building> m_buildings; QList<QList<QWidget*>> m_widgets; public: Class() { for (int i = 0; i<m_buildings.size(); ++i) ...
Update to match edited question.
Update to match edited question.
C++
unlicense
KubaO/stackoverflown,KubaO/stackoverflown,KubaO/stackoverflown
b8d330e27150a97e193f65bfe8a422d3420082ba
src/examples/22-vertex_shading/scene.cpp
src/examples/22-vertex_shading/scene.cpp
#include "scene.h" #include "mesh.h" #include "material.h" #include <glm/gtc/matrix_transform.hpp> #include <assimp/Importer.hpp> #include <assimp/scene.h> #include <assimp/postprocess.h> Scene::Scene() { } Scene::~Scene() { for(auto it = m_meshes.begin(); it != m_meshes.end(); ++it) { delete *it; ...
#include "scene.h" #include "mesh.h" #include "material.h" #include <glm/gtc/matrix_transform.hpp> #include <assimp/Importer.hpp> #include <assimp/scene.h> #include <assimp/postprocess.h> Scene::Scene() { } Scene::~Scene() { for(auto it = m_meshes.begin(); it != m_meshes.end(); ++it) { delete *it; ...
Fix potential memory leak in vertex shading example
Fix potential memory leak in vertex shading example
C++
mit
m-decoster/glExamples,m-decoster/glExamples
706e9f92fed9d9a936cfa1c3871a45d6814cd5d0
efficiency/efficiency/QWebViewWithHooks.cpp
efficiency/efficiency/QWebViewWithHooks.cpp
// This file extends the QWebView class to add additional functionality. #include "stdafx.h" using namespace std; void QWebViewWithHooks::watch(string selector, Getter getter, Callback callback){ int uuid = watchUuid++; watches.push_back(make_tuple(QString::fromStdString(selector), getter, callback, uuid) ); watchV...
// This file extends the QWebView class to add additional functionality. #include "stdafx.h" using namespace std; void QWebViewWithHooks::watch(string selector, Getter getter, Callback callback){ int uuid = watchUuid++; watches.push_back(make_tuple(QString::fromStdString(selector), getter, callback, uuid) ); watchV...
Fix tack poh's merge conflict which he is aware of but doesn't want to fix.
[UI] Fix tack poh's merge conflict which he is aware of but doesn't want to fix.
C++
mit
cs2103aug2014-w13-3c/main
a99bad4ab79d49e9f82b2f144f239df6895dd7e9
Trajectory.cpp
Trajectory.cpp
/* * Chemharp, an efficient IO library for chemistry file formats * Copyright (C) 2015 Guillaume Fraux * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/ */ #includ...
/* * Chemharp, an efficient IO library for chemistry file formats * Copyright (C) 2015 Guillaume Fraux * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/ */ #includ...
Update the Python interface with the new names
Update the Python interface with the new names
C++
mpl-2.0
Luthaf/Chemharp-python
9cc8ba8e00ddac532cd206873cdaacc0b85eb22e
opencog/rule-engine/URELogger.cc
opencog/rule-engine/URELogger.cc
/* * URELogger.cc * * Copyright (C) 2016 OpenCog Foundation * * Author: Nil Geisweiller * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License v3 as * published by the Free Software Foundation and including the exceptions * at htt...
/* * URELogger.cc * * Copyright (C) 2016 OpenCog Foundation * * Author: Nil Geisweiller * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License v3 as * published by the Free Software Foundation and including the exceptions * at htt...
Rename bc_* by ure_* in ure_logger()
Rename bc_* by ure_* in ure_logger()
C++
agpl-3.0
inflector/atomspace,rTreutlein/atomspace,misgeatgit/atomspace,AmeBel/atomspace,rTreutlein/atomspace,AmeBel/atomspace,rTreutlein/atomspace,AmeBel/atomspace,inflector/atomspace,AmeBel/atomspace,misgeatgit/atomspace,rTreutlein/atomspace,misgeatgit/atomspace,inflector/atomspace,AmeBel/atomspace,misgeatgit/atomspace,rTreutl...
0b25084278f7935ddd9d3560cf0f7ed74e374460
week4/solutions/problem1/bank_account.cpp
week4/solutions/problem1/bank_account.cpp
#include <iostream> using namespace std; class BankAccount { char clientName[23]; char id[15]; double account; public: BankAccount(const char _clientName[], const char _id[], double _account) { strcpy(clientName, _clientName); strcpy(id, _id); account = _account; } void print() { cout <...
#include <iostream> using namespace std; class BankAccount { char clientName[23]; char id[15]; double account; public: BankAccount(const char _clientName[], const char _id[], double _account) { strcpy(clientName, _clientName); strcpy(id, _id); account = _account; } void print() { cout <...
Add validation for draw method. Don't draw amount if there is not enough in account
Add validation for draw method. Don't draw amount if there is not enough in account
C++
mit
dimitaruzunov/oop-practicum-2015-16
233bb86a4c52a3d7d9c657ec2579d05bb0adb183
src/tiles/tiles_costs.cc
src/tiles/tiles_costs.cc
/** * \file tiles_costs.cpp * * * * \author eaburns * \date 05-01-2010 */ #include <string> #include <iostream> using namespace std; #include <stdlib.h> #include <string.h> #include "tiles_costs.h" struct cost_tab_ent { string name; TilesCostFunction &fun; }; static TilesUnitCost unit_cost = TilesUnitCos...
/** * \file tiles_costs.cpp * * * * \author eaburns * \date 05-01-2010 */ #include <string> #include <iostream> using namespace std; #include <stdlib.h> #include <string.h> #include "tiles_costs.h" struct cost_tab_ent { string name; TilesCostFunction &fun; }; static TilesUnitCost unit_cost = TilesUnitCos...
Print an error on a bad tiles cost function name instead of silently quitting.
Print an error on a bad tiles cost function name instead of silently quitting.
C++
mit
eaburns/pbnf,eaburns/pbnf,eaburns/pbnf,eaburns/pbnf
0ec0049495db65780e386d00200c07a73905ea92
test/main.cpp
test/main.cpp
#include "google/gtest/gtest.h" int main(int argc, char **argv) { testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); }
#include "google/gtest/gtest.h" #include <messmer/cpp-utils/assert/backtrace.h> int main(int argc, char **argv) { cpputils::showBacktraceOnSigSegv(); testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); }
Test cases print stack trace on sigsegv
Test cases print stack trace on sigsegv
C++
apache-2.0
cryfs/copyfs
be8e8b6fe732a58c2aefe549b5b838ee39facc8b
src/mirplatform.cpp
src/mirplatform.cpp
/* * This file is part of Maliit framework * * * Copyright (C) 2014 Dinesh Manajipet <saidinesh5@gmail.com> * * 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 * and appea...
/* * This file is part of Maliit framework * * * Copyright (C) 2014 Dinesh Manajipet <saidinesh5@gmail.com> * * 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 * and appea...
Set window role for Mir backend
Set window role for Mir backend
C++
lgpl-2.1
Elleo/framework,Elleo/framework
56141f58ee9bd8361f6f0d4c95902a39d7f46cf7
src/MMU.cpp
src/MMU.cpp
#include "MMU.hpp" #include <iterator> #include <limits> namespace Core8 { Chip8::BYTE MMU::readByte(const std::size_t address) const { const auto byte = memory.at(address); return byte; } Chip8::WORD MMU::readWord(const std::size_t address) const { const auto msb = memory.at(address) << std::numeric_limits<...
#include "MMU.hpp" #include <algorithm> #include <iterator> #include <limits> #include <vector> namespace Core8 { Chip8::BYTE MMU::readByte(const std::size_t address) const { const auto byte = memory.at(address); return byte; } Chip8::WORD MMU::readWord(const std::size_t address) const { const auto msb = mem...
Fix load rom memory boundaries
Fix load rom memory boundaries
C++
mit
benvenutti/core8,benvenutti/core8
25ab026d651e000764c4f06dd4a6f6bcbf8a0bb6
ouzel/network/Network.cpp
ouzel/network/Network.cpp
// Copyright (C) 2017 Elviss Strazdins // This file is part of the Ouzel engine. #ifdef _WIN32 #define NOMINMAX #include <winsock2.h> #else #include <sys/socket.h> #include <netinet/in.h> #include <poll.h> #endif #include "Network.hpp" #include "utils/Log.hpp" namespace ouzel { namespace network { Net...
// Copyright (C) 2017 Elviss Strazdins // This file is part of the Ouzel engine. #ifdef _WIN32 #define NOMINMAX #include <winsock2.h> #else #include <sys/socket.h> #include <netinet/in.h> #include <poll.h> #endif #include "Network.hpp" #include "utils/Log.hpp" namespace ouzel { namespace network { Net...
Call WSACleanup only on Windows
Call WSACleanup only on Windows
C++
unlicense
elvman/ouzel,elnormous/ouzel,elvman/ouzel,elnormous/ouzel,elnormous/ouzel
754cc445d6f27b1da5ba67ad12152eee47566fde
main.cpp
main.cpp
#include <SFML/Graphics.hpp> #include <SFML/System/Clock.hpp> #include <iostream> int main() { sf::RenderWindow window(sf::VideoMode(800,600), "Psychic Dangerzone"); window.setVerticalSyncEnabled(true); sf::Clock world_clock; float last_frame_time; while(window.isOpen()) { last_frame_tim...
#include <SFML/Graphics.hpp> #include <SFML/System/Clock.hpp> #include <iostream> int main() { sf::RenderWindow window(sf::VideoMode(800,600), "Psychic Dangerzone"); window.setVerticalSyncEnabled(true); sf::Clock world_clock; sf::CircleShape player(50); float last_frame_time; while(window.i...
Add a player circle that can move
Add a player circle that can move
C++
apache-2.0
branan/psychic-dangerzone
5ab3b32a776a0ac9f5ed6a4fe79bfddae83d69b2
lms/test/endian.cpp
lms/test/endian.cpp
#include "gtest/gtest.h" #include "lms/endian.h" TEST(Endian, uint16) { using lms::Endian; ASSERT_EQ(uint16_t(0xCAFEu), Endian::betoh(Endian::htobe(uint16_t(0xCAFEu)))); ASSERT_EQ(uint16_t(0xCAFEu), Endian::letoh(Endian::htole(uint16_t(0xCAFEu)))); } TEST(Endian, uint32) { using lms::Endian; ASSER...
#include "gtest/gtest.h" #include "lms/endian.h" TEST(Endian, uint16) { using lms::Endian; ASSERT_EQ(0xFECAu, Endian::letoh(Endian::htobe(uint16_t(0xCAFEu)))); ASSERT_EQ(0xFECAu, Endian::betoh(Endian::htole(uint16_t(0xCAFEu)))); } TEST(Endian, uint32) { using lms::Endian; ASSERT_EQ(0xEFBEADDEu, En...
Improve test cases for lms::Endian
Improve test cases for lms::Endian
C++
apache-2.0
lms-org/LMS,lms-org/LMS,Phibedy/LMS,Phibedy/LMS
12186eea95995bf821fd32c53563cff3b98267e6
src/renderer/renderer.cpp
src/renderer/renderer.cpp
#include "linalg/ray.h" #include "geometry/differential_geometry.h" #include "geometry/geometry.h" #include "scene.h" #include "integrator/surface_integrator.h" #include "renderer/renderer.h" Renderer::Renderer(std::unique_ptr<SurfaceIntegrator> surface_integrator) : surface_integrator(std::move(surface_integrator)) ...
#include "linalg/ray.h" #include "geometry/differential_geometry.h" #include "geometry/geometry.h" #include "scene.h" #include "integrator/surface_integrator.h" #include "renderer/renderer.h" Renderer::Renderer(std::unique_ptr<SurfaceIntegrator> surface_integrator) : surface_integrator(std::move(surface_integrator)) ...
Fix regression of not taking into account environment map
Fix regression of not taking into account environment map Although this will likely be migrated to treat as an infinite area light source like PBR does
C++
mit
Twinklebear/tray,Twinklebear/tray
bab497b9f94cd1538c6b3348c2331daf27dd092e
test/SemaCXX/aggregate-initialization.cpp
test/SemaCXX/aggregate-initialization.cpp
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s // Verify that we can't initialize non-aggregates with an initializer // list. struct NonAggr1 { NonAggr1(int) { } int m; }; struct Base { }; struct NonAggr2 : public Base { int m; }; class NonAggr3 { int m; }; struct NonAggr4 { int m; virtual voi...
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s // Verify that we can't initialize non-aggregates with an initializer // list. struct NonAggr1 { NonAggr1(int) { } int m; }; struct Base { }; struct NonAggr2 : public Base { int m; }; class NonAggr3 { int m; }; struct NonAggr4 { int m; virtual voi...
Add testcase for PR5817, although the bug was already fixed
Add testcase for PR5817, although the bug was already fixed git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@92858 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/cl...
38de7fc1ce3055403c78b36e0b7ba92e98ffacf3
tools/mugen-converter/src/generator.cpp
tools/mugen-converter/src/generator.cpp
#include "generator.h" #include <iostream> #include <fstream> using namespace Mugen; CharacterGenerator::CharacterGenerator(const std::string & filename): filename(filename){ } CharacterGenerator::~CharacterGenerator(){ } void CharacterGenerator::output(const std::string & file){ Mugen::PythonStream out; o...
#include "generator.h" #include <iostream> #include <fstream> using namespace Mugen; CharacterGenerator::CharacterGenerator(const std::string & filename): filename(filename){ } CharacterGenerator::~CharacterGenerator(){ } void CharacterGenerator::output(const std::string & file){ Mugen::PythonStream out; o...
Indent code to more or less visualize the indentation of the outputed python code.
Indent code to more or less visualize the indentation of the outputed python code.
C++
bsd-3-clause
scristopher/paintown,scristopher/paintown,scristopher/paintown,scristopher/paintown,scristopher/paintown,scristopher/paintown,scristopher/paintown,scristopher/paintown
307a9d19f33684386b5150834265653c4f4c5ef8
2013-nov-bronze/1-combo/cpp11/main.cpp
2013-nov-bronze/1-combo/cpp11/main.cpp
#include <istream> #include <fstream> #include <set> #include <vector> #include <array> #include <algorithm> #include <iterator> using namespace std; int main() { ifstream cin("combo.in"); ofstream cout("combo.out"); int size; cin >> size; set<int> options; for (int i = 0; i < 2; i++) { int a, b, c; cin >...
#include <fstream> #include <set> using namespace std; int main() { ifstream cin("combo.in"); ofstream cout("combo.out"); int size; cin >> size; set<int> options; for (int i = 0; i < 2; i++) { int a, b, c; cin >> a >> b >> c; // creates permutations of allowable combinations and turns them into // an...
Remove unused includes from the C++11 solution for Nov. 2013 Bronze Problem 1
Remove unused includes from the C++11 solution for Nov. 2013 Bronze Problem 1
C++
mit
hsun324/usaco-solutions,hsun324/usaco-solutions
2c39f83b5fb313ddb015d4aa32968765c07bf155
test/regression/custom_debug_log.cc
test/regression/custom_debug_log.cc
/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/) * * You may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * If any of the files rela...
/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/) * * You may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * If any of the files rela...
Fix the regression test regexp validation
Fix the regression test regexp validation
C++
apache-2.0
wafbuild/ModSecurity,defanator/ModSecurity,defanator/ModSecurity,wafbuild/ModSecurity,SpiderLabs/ModSecurity,SpiderLabs/ModSecurity,wafbuild/ModSecurity,SpiderLabs/ModSecurity,defanator/ModSecurity
2ebc6faf999708676fa08524ffeb0df8d1988e3a
test/Tooling/clang-diff-json.cpp
test/Tooling/clang-diff-json.cpp
// RUN: clang-diff -ast-dump %s -- \ // RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \ // RUN: | FileCheck %s // CHECK: "begin": 294, // CHECK: "type": "CXXRecordDecl", // CHECK: "type": "FieldDecl", // CHECK: "end": 314, class A { int x; }; // ...
// RUN: clang-diff -ast-dump %s -- \ // RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \ // RUN: | FileCheck %s // CHECK: "begin": 294, // CHECK: "type": "CXXRecordDecl", // CHECK: "type": "FieldDecl", // CHECK: "end": 314, class A { int x; }; // ...
Fix test for python 3
[clang-diff] Fix test for python 3 git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@311220 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl...
61f7958d3f1ffdc1bafc0a2764991bf40d95424d
SnakePredictor/stdafx.cpp
SnakePredictor/stdafx.cpp
/* // This file is part of SnakePredictor // // (c) Daniel McAssey <hello@glokon.me> // // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. */ // stdafx.cpp : source file that includes just the standard includes // CallWinsock.pch will be the p...
/* // This file is part of SnakePredictor // // (c) Daniel McAssey <hello@glokon.me> // // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. */ // stdafx.cpp : source file that includes just the standard includes // SnakePredictor.pch will be th...
Fix incorrect comment on precompiled header
Fix incorrect comment on precompiled header
C++
mit
DanielMcAssey/SnakePredictor,DanielMcAssey/SnakePredictor
1ed0628a647e9125bd7300e27cca37729bff89f2
You-DataStore-Tests/datastore_api_test.cpp
You-DataStore-Tests/datastore_api_test.cpp
#include "stdafx.h" #include "CppUnitTest.h" #include "datastore.h" using Assert = Microsoft::VisualStudio::CppUnitTestFramework::Assert; namespace YouDataStoreTests { TEST_CLASS(DataStoreApiTest) { public: TEST_METHOD(DataStoreDummyTest) { // You::DataStore::DataStore sut; // sut.post(std::unordered_map<std::w...
#include "stdafx.h" #include "CppUnitTest.h" #include "datastore.h" using Assert = Microsoft::VisualStudio::CppUnitTestFramework::Assert; using DataStore = You::DataStore::DataStore; namespace YouDataStoreTests { TEST_CLASS(DataStoreApiTest) { public: TEST_METHOD(DataStore_Post_Basic_Test) { You::DataStore::DataS...
Add unit test for post method
Add unit test for post method
C++
mit
cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main
e7582ed0ad5bd66511c1c9896988f8879a929e99
Demo01-WindowManager/DemoWindowManager.cpp
Demo01-WindowManager/DemoWindowManager.cpp
#include <ionWindow.h> #include <ionGraphicsGL.h> using namespace ion; int main() { Log::AddDefaultOutputs(); SingletonPointer<CWindowManager> WindowManager; SingletonPointer<CGraphicsAPI> GraphicsAPI; GraphicsAPI->Init(new Graphics::COpenGLImplementation()); WindowManager->Init(GraphicsAPI); ...
#include <ionWindow.h> #include <ionGraphicsGL.h> using namespace ion; int main() { Log::AddDefaultOutputs(); Log::Info("Info"); Log::Warn("Warning"); Log::Error("Error"); SingletonPointer<CWindowManager> WindowManager; SingletonPointer<CGraphicsAPI> GraphicsAPI; GraphicsAPI->Init(new Gr...
Add example of log channels
[Demo01] Add example of log channels
C++
mit
iondune/ionEngine,iondune/ionEngine
b55c5dcb861d34563842e336446eca01859cf232
bindings/python/mapnik_text_symbolizer.cpp
bindings/python/mapnik_text_symbolizer.cpp
/* This file is part of python_mapnik (c++/python mapping toolkit) * Copyright (C) 2005 Artem Pavlenko, Jean-Francois Doyon * * Mapnik is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * o...
/* This file is part of python_mapnik (c++/python mapping toolkit) * Copyright (C) 2005 Artem Pavlenko, Jean-Francois Doyon * * Mapnik is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * o...
Add support for halo's to TextSymbolizer().
Add support for halo's to TextSymbolizer(). git-svn-id: 5adfda8227e14e59fd47d5bd9925a30df16fed74@184 d397654b-2ff0-0310-9e29-ba003691a0f9
C++
lgpl-2.1
craigds/mapnik2,makinacorpus/mapnik2,craigds/mapnik2,craigds/mapnik2,makinacorpus/mapnik2,craigds/mapnik2,makinacorpus/mapnik2,makinacorpus/mapnik2
e9a268574e0d3f3a4ff62e46496871d34229726f
Source/examples/padded.cpp
Source/examples/padded.cpp
#include <boost/config.hpp> struct Foo { char x; #include <leathers/push> #include <leathers/padded> long y; #include <leathers/pop> }; int main() { // struct Foo must be used, otherwise there will be no warning (clang) return static_cast<int>(Foo().y); }
#include <boost/config.hpp> struct Foo { char x; #include <leathers/push> #if !defined(SHOW_WARNINGS) # include <leathers/padded> #endif long y; #include <leathers/pop> }; int main() { // struct Foo must be used, otherwise there will be no warning (clang) return static_cast<int>(Foo().y); }
Check SHOW_WARNINGS macro in example
Check SHOW_WARNINGS macro in example
C++
bsd-2-clause
ruslo/leathers,ruslo/leathers
3becdd205f2ec24554bfb61633eb49a54af92793
Tests/UnitTests/Tasks/SimpleTasks/ControlTaskTests.cpp
Tests/UnitTests/Tasks/SimpleTasks/ControlTaskTests.cpp
// Copyright (c) 2018 Chris Ohk, Youngjoong Kim, SeungHyun Jeon // We are making my contributions/submissions to this project solely in our // personal capacity and are not conveying any rights to any intellectual // property of any third parties. #include <Utils/TestUtils.hpp> #include "gtest/gtest.h" #include <hsp...
// Copyright (c) 2018 Chris Ohk, Youngjoong Kim, SeungHyun Jeon // We are making my contributions/submissions to this project solely in our // personal capacity and are not conveying any rights to any intellectual // property of any third parties. #include <Utils/TestUtils.hpp> #include "gtest/gtest.h" #include <hsp...
Add unit test for ControlTask
[WIP] test: Add unit test for ControlTask
C++
mit
Hearthstonepp/Hearthstonepp,Hearthstonepp/Hearthstonepp
3a0a0af83517f626af3ab000b3470edf29a98f48
lcd.cpp
lcd.cpp
#include <avr/io.h> #include "lcd.h" LCD5110 myGLCD; void LCD_init(void) { /* Set MOSI and SCK output */ DDRB |= (1<<PB3)|(1<<PB5); /* Enable SPI, Master, CPOL=1, CPHA=1 */ /* Also: MSB first, clock=fosc/4 */ SPCR = (1<<SPE)|(1<<MSTR)|(1<<CPOL)|(1<<CPHA) | 3; /* Set the pins for DC, RST and CS to outpu...
#include <avr/io.h> #include "lcd.h" LCD5110 myGLCD; void LCD_init(void) { /* Set MOSI and SCK output */ DDRB |= (1<<PB3)|(1<<PB5); /* Enable SPI, Master, CPOL=1, CPHA=1 */ /* Also: MSB first, clock=fosc/4 */ SPCR = (1<<SPE)|(1<<MSTR)|(1<<CPOL)|(1<<CPHA) | (1<<SPR0); /* Set the pins for DC, RST and CS ...
Use a faster SPI clock to the LCD
Use a faster SPI clock to the LCD
C++
bsd-3-clause
mtempest/siggen1,mtempest/siggen1,mtempest/siggen1,mtempest/siggen1
9f22f8d270662171aa7e179f57d57ce0b7468612
code/ylikuutio/ontology/chunk.cpp
code/ylikuutio/ontology/chunk.cpp
#include "chunk.hpp" #include "chunk_master.hpp" #include "code/ylikuutio/hierarchy/hierarchy_templates.hpp" namespace yli { namespace ontology { void Chunk::bind_to_parent() { // requirements: // `this->parent` must not be `nullptr`. yli::ontology::ChunkMast...
#include "chunk.hpp" #include "chunk_master.hpp" #include "code/ylikuutio/hierarchy/hierarchy_templates.hpp" namespace yli { namespace ontology { void Chunk::bind_to_parent() { // requirements: // `this->parent` must not be `nullptr`. yli::ontology::ChunkMast...
Check `parent` for `nullptr`. Cleaning up code.
`Chunk::~Chunk`: Check `parent` for `nullptr`. Cleaning up code. modified: code/ylikuutio/ontology/chunk.cpp
C++
agpl-3.0
nrz/ylikuutio,nrz/ylikuutio,nrz/ylikuutio,nrz/ylikuutio
b125095170774a2d62240cbeddaeb02c2c385ee5
Main.cpp
Main.cpp
// Native C++ Libraries #include <iostream> #include <string> // C++ Interpreter Libraries #include <Console.h> using namespace std; int main() { }
// Native C++ Libraries #include <iostream> #include <string> // C++ Interpreter Libraries #include <Console.h> using namespace std; int main() { RESTART: string input = ""; getline(cin, input); cin.ignore(); goto RESTART; }
Add a way of Input and program loop.
Add a way of Input and program loop. Added a way of enabling input from the user. The loop is used for to reset the program instead of exiting from it.
C++
mit
Project-CPP/CPP-Interpreter
74d03eaf87230bc805408fabbb60261a3b041006
src/compiler/translator/compilerdebug.cpp
src/compiler/translator/compilerdebug.cpp
// // Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // debug.cpp: Debugging utilities. #include "compiler/translator/compilerdebug.h" #include <stdarg.h> #include <stdio.h> #include "...
// // Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // debug.cpp: Debugging utilities. #include "compiler/translator/compilerdebug.h" #include <stdarg.h> #include <stdio.h> #include "...
Fix unused variable warning in compiler/debug.cpp.
Fix unused variable warning in compiler/debug.cpp. BUG=angle:534 Change-Id: I893e552628c7deba4bc67baae6e5e28b6161c5d4 Reviewed-on: https://chromium-review.googlesource.com/178438 Reviewed-by: Geoff Lang <b6fc25fe0362055230985c05cbfa8adb741ccc0f@chromium.org> Commit-Queue: Geoff Lang <b6fc25fe0362055230985c05cbfa8adb7...
C++
bsd-3-clause
csa7mdm/angle,vvuk/angle,csa7mdm/angle,mybios/angle,mybios/angle,nandhanurrevanth/angle,bsergean/angle,ppy/angle,bsergean/angle,larsbergstrom/angle,mikolalysenko/angle,geekboxzone/lollipop_external_chromium_org_third_party_angle,MSOpenTech/angle,ghostoy/angle,ecoal95/angle,ecoal95/angle,larsbergstrom/angle,larsbergstro...
20856faabd254c459b2c9eb7878d4d95ef4d2df3
src/miniMAT/util/NumDigits.cpp
src/miniMAT/util/NumDigits.cpp
#include <miniMAT/util/NumDigits.hpp> #include <cmath> namespace miniMAT { namespace util { int NumDigits(double num) { return log10(num) + 1; } } }
#include <miniMAT/util/NumDigits.hpp> #include <cmath> namespace miniMAT { namespace util { int NumDigits(double num) { return num == 0 ? 1 : fabs(log10(num)) + 1; } } }
Fix bug involving printing 'zeroed' matrices
Fix bug involving printing 'zeroed' matrices
C++
mit
fmenozzi/miniMAT,fmenozzi/miniMAT
cd7353b4e289e154ad0e0face75afe103773f9ae
ledify/src/RestServer.cpp
ledify/src/RestServer.cpp
#include "RestServer.h" #include <qhttpserver.hpp> #include <qhttpserverrequest.hpp> #include <qhttpserverresponse.hpp> #include <QLoggingCategory> Q_LOGGING_CATEGORY(REST, "ledify.restserver", QtWarningMsg) using namespace qhttp::server; RestServer::RestServer(QObject *parent) : QObject(parent) { m_server = ne...
#include "RestServer.h" #include <qhttpserver.hpp> #include <qhttpserverrequest.hpp> #include <qhttpserverresponse.hpp> #include <QLoggingCategory> Q_LOGGING_CATEGORY(REST, "ledify.restserver", QtWarningMsg) using namespace qhttp::server; RestServer::RestServer(QObject *parent) : QObject(parent) { m_server = ne...
Allow multiple commands to be sent to the server
Allow multiple commands to be sent to the server
C++
mit
javier-ruiz-b/ledify,javier-ruiz-b/ledify,javier-ruiz-b/ledify
b63d8d2609985c26835c3890a3a929af6a4a6d1e
lib/Basic/OpenMPKinds.cpp
lib/Basic/OpenMPKinds.cpp
//===--- OpenMPKinds.cpp - Token Kinds Support ----------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
//===--- OpenMPKinds.cpp - Token Kinds Support ----------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
Fix a layering violation introduced in r177705.
Fix a layering violation introduced in r177705. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@177922 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-cl...
29ac38b734a4c6e8ba9356cde1d2912f326032a4
plugin/handler_socket/libhsclient/fatal.cpp
plugin/handler_socket/libhsclient/fatal.cpp
// vim:sw=2:ai /* * Copyright (C) 2010 DeNA Co.,Ltd.. All rights reserved. * See COPYRIGHT.txt for details. */ #include <stdlib.h> #include <stdio.h> #include <syslog.h> #include "fatal.hpp" namespace dena { const int opt_syslog = LOG_ERR | LOG_PID | LOG_CONS; void fatal_exit(const std::string& message) { f...
// vim:sw=2:ai /* * Copyright (C) 2010 DeNA Co.,Ltd.. All rights reserved. * See COPYRIGHT.txt for details. */ #include <stdlib.h> #include <stdio.h> #include <syslog.h> #include <unistd.h> #include "fatal.hpp" namespace dena { const int opt_syslog = LOG_ERR | LOG_PID | LOG_CONS; void fatal_exit(const std::st...
Add missing include (fixes compile failure with gcc 4.7).
Add missing include (fixes compile failure with gcc 4.7).
C++
lgpl-2.1
ollie314/server,ollie314/server,flynn1973/mariadb-aix,natsys/mariadb_10.2,davidl-zend/zenddbi,flynn1973/mariadb-aix,natsys/mariadb_10.2,natsys/mariadb_10.2,ollie314/server,flynn1973/mariadb-aix,davidl-zend/zenddbi,flynn1973/mariadb-aix,ollie314/server,davidl-zend/zenddbi,flynn1973/mariadb-aix,flynn1973/mariadb-aix,slan...
3feb6176e4435d12891347769c206a4d640e7f2e
src/Podrios.cpp
src/Podrios.cpp
/* * Podrios.cpp * * Created on: 2014年10月23日 * Author: nemo */ #include "GameTable/GamblingTable.h" #include <iostream> using namespace std; int main() { cout << "Start Podrios." << endl; GamblingTable *gamblingTable_Ptr = new GamblingTable(); return 0; }
/* * Podrios.cpp * * Created on: 2014年10月23日 * Author: nemo */ #include "GameTable/GamblingTable.h" #include <iostream> using namespace std; int main() { cout << "Start Podrios." << endl; GamblingTable gamblingTable; return 0; }
Modify the way of GambilingTable construct.
Modify the way of GambilingTable construct.
C++
apache-2.0
NemoChenTW/PodriosCPP,NemoChenTW/PodriosCPP,NemoChenTW/PodriosCPP,NemoChenTW/PodriosCPP
45dcd40c274e4571ea6de04d8af4cfa300b2ea2e
source/platform/win32/yield.cpp
source/platform/win32/yield.cpp
// Copyright (c) 2011, Christian Rorvik // Distributed under the Simplified BSD License (See accompanying file LICENSE.txt) #include "crunch/concurrency/yield.hpp" #include <windows.h> namespace Crunch { namespace Concurrency { void ThreadYield() { SwitchToThread(); } void ThreadSleep(Duration duration) { ...
// Copyright (c) 2011, Christian Rorvik // Distributed under the Simplified BSD License (See accompanying file LICENSE.txt) #include "crunch/concurrency/yield.hpp" #include <windows.h> namespace Crunch { namespace Concurrency { void ThreadYield() { ::SwitchToThread(); } void ThreadSleep(Duration duration) { ...
Check for negative duration in ThreadSleep on Windows
Check for negative duration in ThreadSleep on Windows
C++
bsd-2-clause
ancapdev/crunch.concurrency
784251f52753055f96cedf98bddc7cd93eb7fe21
tools/lldb-server/SystemInitializerLLGS.cpp
tools/lldb-server/SystemInitializerLLGS.cpp
//===-- SystemInitializerLLGS.cpp -------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
//===-- SystemInitializerLLGS.cpp -------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
Fix windows/mac builds broken by r333182.
Fix windows/mac builds broken by r333182. I should've known that something was wrong when only one of my plugins was prefixed by the lldb_private namespace. git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@333183 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb
fbc0a696dda67164473744153da932a0a998ec1a
sky/engine/tonic/dart_invoke.cc
sky/engine/tonic/dart_invoke.cc
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "sky/engine/tonic/dart_invoke.h" #include "base/logging.h" #include "base/trace_event/trace_event.h" #include "sky/engine/tonic/dart_error.h" n...
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "sky/engine/tonic/dart_invoke.h" #include "base/logging.h" #include "base/trace_event/trace_event.h" #include "sky/engine/tonic/dart_error.h" n...
Check if invocation of a closure failed due to a compilation error
Check if invocation of a closure failed due to a compilation error This is a fix for bug #1325. The test framework is running the test code as a microtask using DartInvokeAppClosure. If the test causes a compilation error, the test framework Dart code can not catch it. The invocation in sky_shell will return a comp...
C++
bsd-3-clause
tvolkert/engine,flutter/engine,devoncarew/engine,mpcomplete/engine,Hixie/sky_engine,devoncarew/engine,krisgiesing/sky_engine,jamesr/flutter_engine,flutter/engine,abarth/sky_engine,devoncarew/sky_engine,devoncarew/sky_engine,Hixie/sky_engine,krisgiesing/sky_engine,mpcomplete/engine,devoncarew/sky_engine,chinmaygarde/flu...
41f39e5cec3380081d68f6c893a200b4d42019a0
test/CodeGenCXX/debug-prefix-map-lambda.cpp
test/CodeGenCXX/debug-prefix-map-lambda.cpp
// RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \ // RUN: -fdebug-prefix-map=%S=/SOURCE_ROOT %s -emit-llvm -o - | FileCheck %s template <typename T> void b(T) {} void c() { // CHECK: !DISubprogram(name: "b<(lambda at // CHECK-SAME: SOURCE_ROOT // CHECK-SAME: [[@LINE+1]...
// RUN: %clang_cc1 -std=c++14 -debug-info-kind=limited \ // RUN: -triple %itanium_abi_triple \ // RUN: -fdebug-prefix-map=%S=/SOURCE_ROOT %s -emit-llvm -o - | FileCheck %s template <typename T> void b(T) {} void c() { // CHECK: !DISubprogram(name: "b<(lambda at // CHECK-SAME: SOURCE_ROOT // CHECK-SA...
Add an explicit -std=c++14 to this test.
Add an explicit -std=c++14 to this test.
C++
apache-2.0
apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang
ffe7693f00f2635f417e34f8a2d1c011850285cd
test/Modules/explicit-build-prefer-self.cpp
test/Modules/explicit-build-prefer-self.cpp
// RUN: rm -rf %t // RUN: %clang_cc1 -fmodules -fno-implicit-modules -emit-module -fmodule-name=a %S/Inputs/explicit-build-prefer-self/map -o a.pcm // RUN: %clang_cc1 -fmodules -fno-implicit-modules -emit-module -fmodule-name=b %S/Inputs/explicit-build-prefer-self/map -o b.pcm
// RUN: rm -rf %t // RUN: %clang_cc1 -fmodules -fno-implicit-modules -emit-module -fmodule-name=a %S/Inputs/explicit-build-prefer-self/map -o %t/a.pcm // RUN: %clang_cc1 -fmodules -fno-implicit-modules -emit-module -fmodule-name=b %S/Inputs/explicit-build-prefer-self/map -o %t/b.pcm
Write output file to temp directory. The tests shouldn't assume that they can write to the current working directory.
Write output file to temp directory. The tests shouldn't assume that they can write to the current working directory. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@240388 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl...
67df6b894e6c21cbeda282b591da6248132ea117
components/animations/AnimationProgram.cpp
components/animations/AnimationProgram.cpp
#include "AnimationProgram.h" #include "esp_log.h" static const char* TAG = "PROGRAM"; AnimationProgram::AnimationProgram(Timer &animator) : programs(), animator(animator) { } void AnimationProgram::putAnimation(uint8_t index, Animation *animation) { programs[index] = animation; } void AnimationProgram::drawF...
#include "AnimationProgram.h" #include "esp_log.h" static const char* TAG = "AnimationProgram"; AnimationProgram::AnimationProgram(Timer &animator) : programs(), animator(animator) { } void AnimationProgram::putAnimation(uint8_t index, Animation *animation) { programs[index] = animation; } void AnimationProgr...
Add range check for set program
Add range check for set program
C++
mit
fweiss/badge,fweiss/badge
55933e6216e62ae04fd8d2773ad8931fd52fe8ac
tests/stack.cpp
tests/stack.cpp
#include "catch.hpp" #include <lua.hpp> #include <luwra.hpp> int test_function_1(int a, int b) { return a - b; } int test_function_2(int a, int b, int c) { return a + b * c; } void test_function_3(int) { } TEST_CASE("stack_interaction") { lua_State* state = luaL_newstate(); luwra::push(state, 1); luwra::pus...
#include "catch.hpp" #include <lua.hpp> #include <luwra.hpp> static int test_function_1(int a, int b) { return a - b; } static int test_function_2(int a, int b, int c) { return a + b * c; } static void test_function_3(int) { } TEST_CASE("stack_interaction") { lua_State* state = luaL_newstate(); luwra::push(s...
Make functions used in tests static
tests: Make functions used in tests static
C++
bsd-3-clause
vapourismo/luwra
0e8e843f7b1e1914a85e49deec69c9afb41d7658
src/utils/distance.cpp
src/utils/distance.cpp
#include "utils/distance.hpp" // Returns the minimum distance (straight line) between two points double distance(cv::Point one, cv::Point two) { return std::sqrt(std::pow(one.x - two.x, 2) + std::pow(one.y - two.y, 2)); } // Returns the two dimensional distance between the components of two points double distance...
#include "utils/distance.hpp" // Returns the minimum distance (straight line) between two points double distance(cv::Point one, cv::Point two) { return std::sqrt(std::pow(one.x - two.x, 2) + std::pow(one.y - two.y, 2)); } double getShortestDistance (cv::Point2f rectPoints[4], double focalLen, int dist, int height...
Remove redundant brackets and lines of code
Remove redundant brackets and lines of code Former-commit-id: 43b8b2723d2b93f3bd13198701f8e113828c2968
C++
bsd-2-clause
valkyrierobotics/vision2017,valkyrierobotics/vision2017,valkyrierobotics/vision2017
e6ff1e6e7cd747f89cc604393010a1fa804eabad
tests/main.cpp
tests/main.cpp
// // Created by Adam Getchell on 2017-12-02. // #define CATCH_CONFIG_RUNNER #include <catch2/catch.hpp> int main( int argc, char* argv[] ) { Catch::Session session; // There must be exactly one instance // writing to session.configData() here sets defaults // this is the preferred way to set them in...
// // Created by Adam Getchell on 2017-12-02. // #define CATCH_CONFIG_RUNNER #include "catch.hpp" int main( int argc, char* argv[] ) { Catch::Session session; // There must be exactly one instance // writing to session.configData() here sets defaults // this is the preferred way to set them int retur...
Revert back to older Catch2
Revert back to older Catch2
C++
bsd-3-clause
acgetchell/causal-sets-explorer,acgetchell/causal-sets-explorer
0750b5c663a00867336cf1e3722524cf6e9d3fb4
chrome/browser/automation/ui_controls_aura.cc
chrome/browser/automation/ui_controls_aura.cc
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/automation/ui_controls.h" #include "base/logging.h" #include "views/view.h" namespace ui_controls { bool SendKeyPress(gfx:...
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/automation/ui_controls.h" #include "base/logging.h" #include "views/view.h" namespace ui_controls { bool SendKeyPress(gfx:...
Fix chrome compile after the switch from Task to base::Bind.
aura: Fix chrome compile after the switch from Task to base::Bind. TBR=jhawkins@chromium.org BUG=none TEST=none Review URL: http://codereview.chromium.org/8322004 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@105817 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
ltilve/chromium,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,ChromiumWebApps/chromium,keishi/chromium,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,...
b5f8ca6cc1deea8b0ff041c3c79aa3b3ce243c9a
src/Game.cpp
src/Game.cpp
#include "Game.hpp" namespace arduino_pong { void Game::run() { while(true) { gameField_.update(); gameField_.render(); } } } // namespace arduino_pong
#include "Game.hpp" #include <Arduino.h> namespace { constexpr uint32_t MsPerUpdate = 16; } // namespace namespace arduino_pong { void Game::run() { uint32_t previous = millis(); uint32_t lag = 0; while(true) { uint32_t current = millis(); uint32_t elapsed = current - previous; ...
Add implementation of a basic game loop.
Add implementation of a basic game loop. Derived from http://gameprogrammingpatterns.com/game-loop.html
C++
mit
kurogit/arduino_pong
31d63ecc0a9ffaeb260d054abf236d8114227b5b
chrome/browser/history/history_publisher.cc
chrome/browser/history/history_publisher.cc
// Copyright (c) 2008-2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/history/history_publisher.h" #include "base/utf_string_conversions.h" namespace history { const char* const HistoryPu...
// Copyright (c) 2008-2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/history/history_publisher.h" #include "base/utf_string_conversions.h" namespace history { const char* const HistoryPu...
Make sure the pointer in PageData::html remains valid while PageData is called.
Make sure the pointer in PageData::html remains valid while PageData is called. BUG=46835 Review URL: http://codereview.chromium.org/2852014 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@50173 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
adobe/chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,Crystalnix/house-of...
a2813e5af94cab372fe015e9f7643981e3e5f081
src/mobile/main.cpp
src/mobile/main.cpp
#include "client.h" #include "tests/test.h" #include <QGuiApplication> #include <QQuickView> #include <QQmlContext> #include <QtQml> #include <QUrl> int main(int argc, char* argv[]) { QGuiApplication app(argc, argv); qmlRegisterUncreatableType<AbstractTest>("mplane", 1, 0, "AbstractTest", "abstract class"); ...
#include "client.h" #include "tests/test.h" #include <QGuiApplication> #include <QQuickView> #include <QQmlContext> #include <QQmlEngine> #include <QtQml> #include <QUrl> int main(int argc, char* argv[]) { QGuiApplication app(argc, argv); qmlRegisterUncreatableType<AbstractTest>("mplane", 1, 0, "AbstractTest...
Quit the application when qml engine wants to.
Quit the application when qml engine wants to.
C++
bsd-3-clause
MKV21/glimpse_client,HSAnet/glimpse_client,personalunion/glimpse_client-1,personalunion/glimpse_client-1,Kri-7-q/glimpse_client-1,personalunion/glimpse_client-1,Kri-7-q/glimpse_client-1,Kri-7-q/glimpse_client-1,personalunion/glimpse_client-1,HSAnet/glimpse_client,MKV21/glimpse_client,HSAnet/glimpse_client,MKV21/glimpse...
9fb85a40d263632e9b669f50db83a76f7f6a585d
src/timing.cpp
src/timing.cpp
//======================================================================= // Copyright Baptiste Wicht 2011-2012. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) //================================================...
//======================================================================= // Copyright Baptiste Wicht 2011-2012. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) //================================================...
Fix the name of the option
Fix the name of the option
C++
mit
vogelsgesang/eddic,wichtounet/eddic,vogelsgesang/eddic,wichtounet/eddic,vogelsgesang/eddic,wichtounet/eddic
08b24b4f9ea7ad41a31347da059a35fb4ad592b3
content/child/file_info_util.cc
content/child/file_info_util.cc
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/child/file_info_util.h" #include "base/logging.h" #include "third_party/WebKit/public/platform/WebFileInfo.h" namespace content { voi...
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/child/file_info_util.h" #include "base/logging.h" #include "third_party/WebKit/public/platform/WebFileInfo.h" namespace content { voi...
Upgrade Blink to milliseconds-based last modified filetimes, part 4.
Upgrade Blink to milliseconds-based last modified filetimes, part 4. Have content::FileInfoToWebFileInfo() set the temporarily Blink-unused field WebFileInfo::modificationTime to something milliseconds-based Once landed, this is to allow Blink to switch to no longer using WebFileInfo::modificationTimeMS, but modifica...
C++
bsd-3-clause
hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,ltilve/chromium,PeterWangIntel/chromiu...
b583e92183f9018ed408d9f548b2d3805252f94f
src/util/validation.cpp
src/util/validation.cpp
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2019 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <util/validation.h> #include <consensus/validation.h> #include <tinyfor...
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2019 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <util/validation.h> #include <consensus/validation.h> #include <tinyfor...
Format CValidationState properly in all cases
Format CValidationState properly in all cases FormatStateMessage does not properly handle the case where CValidationState::IsValid() returns true. Use "Valid" for the state in this case.
C++
mit
DigitalPandacoin/pandacoin,peercoin/peercoin,DigitalPandacoin/pandacoin,peercoin/peercoin,DigitalPandacoin/pandacoin,DigitalPandacoin/pandacoin,DigitalPandacoin/pandacoin,peercoin/peercoin,peercoin/peercoin,peercoin/peercoin,peercoin/peercoin,DigitalPandacoin/pandacoin
609113b88a80396200a6b5bda842a6b3cfa63aa9
source/glbinding/source/GetProcAddress.cpp
source/glbinding/source/GetProcAddress.cpp
#include <glbinding/GetProcAddress.h> #include <cassert> #ifdef WIN32 #include <string> #include <windows.h> #elif __APPLE__ #include <string> #include <dlfcn.h> #else #include <GL/glx.h> #endif namespace gl { ProcAddress GetProcAddress(const char * name) { #ifdef WIN32 typedef void (__stdca...
#include <glbinding/GetProcAddress.h> #ifdef WIN32 #include <string> #include <windows.h> #elif __APPLE__ #include <cassert> #include <string> #include <dlfcn.h> #else #include <GL/glx.h> #endif namespace gl { ProcAddress GetProcAddress(const char * name) { #ifdef WIN32 typedef void (__s...
Move cassert include to OS X specific code
Move cassert include to OS X specific code
C++
mit
j-o/glbinding,hpi-r2d2/glbinding,hpi-r2d2/glbinding,j-o/glbinding,mcleary/glbinding,hpicgs/glbinding,mcleary/glbinding,hpicgs/glbinding,hpi-r2d2/glbinding,hpicgs/glbinding,hpi-r2d2/glbinding,hpicgs/glbinding,mcleary/glbinding,cginternals/glbinding,mcleary/glbinding,cginternals/glbinding,j-o/glbinding,j-o/glbinding
e255afd121357c7d87227e503f6e3dd4b394c0dc
src/driver/servo_krs/src/servo_krs_node.cpp
src/driver/servo_krs/src/servo_krs_node.cpp
#include<ros/ros.h> #include<ics3/ics> #include<servo_msgs/IdBased.h> ics::ICS3* driver {nullptr}; void move(const servo_msgs::IdBased::ConstPtr& msg) { auto degree = ics::Angle::newDegree(msg->angle); auto nowpos = driver->move(msg->id, degree); // TODO: publish now pos } int main(int argc, char** argv) { ...
#include<ros/ros.h> #include<ics3/ics> #include<servo_msgs/IdBased.h> ics::ICS3* driver {nullptr}; void move(const servo_msgs::IdBased::ConstPtr& msg) { auto degree = ics::Angle::newDegree(msg->angle); auto nowpos = driver->move(msg->id, degree); // TODO: publish now pos } int main(int argc, char** argv) { ...
Update subscribe topic for add pub topic
Update subscribe topic for add pub topic 今後のpublish topicのためにトピック名をわかりやすいものに変更
C++
mit
agrirobo/arcsys2,agrirobo/arcsys2
e4ec8767170f386d8778859a260f8a2fe5baf693
src/driver/servo_krs/src/servo_krs_node.cpp
src/driver/servo_krs/src/servo_krs_node.cpp
#include<ros/ros.h> #include<ics3/ics> #include<servo_msgs/IdBased.h> std::string path; void move(const servo_msgs::IdBased::ConstPtr& msg) { static ics::ICS3 ics {path.c_str(), ics::Baudrate::RATE115200()}; auto degree = ics::Angle::newDegree(msg->angle); auto nowpos = ics.move(msg->id, degree); // TODO: pub...
#include<ros/ros.h> #include<ics3/ics> #include<servo_msgs/IdBased.h> ics::ICS3* driver; void move(const servo_msgs::IdBased::ConstPtr& msg) { auto degree = ics::Angle::newDegree(msg->angle); auto nowpos = driver->move(msg->id, degree); // TODO: publish now pos } int main(int argc, char** argv) { ros::ini...
Update timing of make ics instance
Update timing of make ics instance
C++
mit
agrirobo/arcsys2,agrirobo/arcsys2
9ebd1390fd7243cfa4e818b45b7c2d9d115fd21b
src/google/protobuf/compiler/perlxs/main.cc
src/google/protobuf/compiler/perlxs/main.cc
#include <google/protobuf/compiler/command_line_interface.h> #include <google/protobuf/compiler/cpp/cpp_generator.h> #include <google/protobuf/compiler/perlxs/perlxs_generator.h> #include <iostream> #include <string> using namespace std; int main(int argc, char* argv[]) { google::protobuf::compiler::CommandLineInt...
#include <google/protobuf/compiler/command_line_interface.h> #include <google/protobuf/compiler/cpp/cpp_generator.h> #include <google/protobuf/compiler/perlxs/perlxs_generator.h> #include <iostream> #include <string> int main(int argc, char* argv[]) { google::protobuf::compiler::CommandLineInterface cli; // Prot...
Remove unused `using namespace std`
Remove unused `using namespace std`
C++
apache-2.0
spiritloose/protobuf-perlxs
4191c8e14c446bc7917b75c48ef0ceed0357dbd3
02-Medium/Hide_Text_in_Images/CPP/main.cpp
02-Medium/Hide_Text_in_Images/CPP/main.cpp
#ifndef MAIN_CPP #define MAIN_CPP #include <iostream> #include <bitset> #include <string> #include <fstream> int main() { std::ifstream myfile; std::string message,value,translate; enum States{W,Z,O,I}; States state = W; myfile.open("input1.txt"); while(!myfile.eof()) { std::getline(myfile,value,' ...
#ifndef MAIN_CPP #define MAIN_CPP #include <iostream> #include <bitset> #include <string> int main() { std::string message,value,translate; enum States{W,Z,O,I}; States state = W; while(std::getline(std::cin,value,' ')) { value = value.substr(2,1); switch(state) { case W: { if(value...
Update c++ steganography solution to use cin
Update c++ steganography solution to use cin
C++
mit
acmatku/ku-ipc-2016,acmatku/ku-ipc-2016,acmatku/ku-ipc-2016,acmatku/ku-ipc-2016
f5e70d360e017053805277f695577b8e99981cba
chrome/browser/extensions/extension_popup_apitest.cc
chrome/browser/extensions/extension_popup_apitest.cc
// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/command_line.h" #include "chrome/browser/extensions/extension_apitest.h" #include "chrome/common/chrome_switches.h" // Flaky, http://c...
// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/command_line.h" #include "chrome/browser/extensions/extension_apitest.h" #include "chrome/common/chrome_switches.h" // Times out. See ...
Disable ExtensionApiTest.Popup. It's been timing out for the last 750+ runs.
Disable ExtensionApiTest.Popup. It's been timing out for the last 750+ runs. TBR=michaeln BUG=46601 TEST=ExtensionApiTest.FLAKY_Popup no longer runs Review URL: http://codereview.chromium.org/3603003 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@61170 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
littlstar/chromium.src,littlstar/chromium.src,Fireblend/chromium-crosswalk,timopulkkinen/BubbleFish,hujiajie/pa-chromium,bright-sparks/chromium-spacewalk,pozdnyakov/chromium-crosswalk,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,Just-D/chromium-1,rogerwang/chromium,zcbenz/cefode-chromium,dednal/chromium.src,mohamed...
c65702bd78a3254991419ec6e8b572479d15d470
particle.cpp
particle.cpp
#include "particle.h" Particle::Particle(const Vector4D &p, const Vector4D &v) : position(p), velocity(v), lifetime(0) { }
#include "particle.h" Particle::Particle(const Vector4D &p, const Vector4D &v) : position(p), velocity(v), lifetime(-1) { }
Set default lifetime to lt 0
Set default lifetime to lt 0
C++
mit
JulioC/Particles,JulioC/Particles
bd1f3d5f647af0ec365271ed96b43a2dce588eba
src/gamelib/core/res/SpriteResource.cpp
src/gamelib/core/res/SpriteResource.cpp
#include "gamelib/core/res/SpriteResource.hpp" #include "gamelib/core/res/ResourceManager.hpp" #include "gamelib/utils/json.hpp" namespace gamelib { void registerSpriteLoader(ResourceManager& resmgr) { resmgr.registerFileType("spr", spriteLoader); } BaseResourceHandle spriteLoader(const std::s...
#include "gamelib/core/res/SpriteResource.hpp" #include "gamelib/core/res/ResourceManager.hpp" #include "gamelib/utils/json.hpp" #include "gamelib/utils/conversions.hpp" namespace gamelib { void registerSpriteLoader(ResourceManager& resmgr) { resmgr.registerFileType("spr", spriteLoader); } Bas...
Use texture size as sprite frame size if not given
Use texture size as sprite frame size if not given
C++
mit
mall0c/TileEngine,mall0c/GameLib
ec7449690e566beae6ee71ed15715f980a26785b
codec-preview/codectabs/h264manager.cpp
codec-preview/codectabs/h264manager.cpp
#include "h264manager.h" H264Manager::H264Manager() { encodingParameters = "-c:v libx264 -preset ultrafast -f matroska"; } void H264Manager::start(QProcess &process, QString file) { QString command = "ffmpeg -re -i \"" + file + "\" -c:v libx264 -preset ultrafast -an -f matroska udp://localhost:" + ENCODED_VID...
#include "h264manager.h" H264Manager::H264Manager() { encodingParameters = "-c:v libx264 -preset ultrafast -f matroska"; }
Remove extra functions from codec classes
Remove extra functions from codec classes
C++
mit
gorge-raccoon/codec-preview,gorge-raccoon/codec-preview
77171dba9f46135d4d2e2920051b1452bb812b7c
src/insert_mode.cc
src/insert_mode.cc
#include <ncurses.h> #include "../../../src/contents.hh" #include "../../../src/key_aliases.hh" #include "../../vick-move/src/move.hh" void enter_insert_mode(contents& contents, boost::optional<int>) { char ch; while(ch = getch() != _escape) { contents.cont[contents.y].insert(contents.x, 1, ch); ...
#include <ncurses.h> #include "../../../src/contents.hh" #include "../../../src/key_aliases.hh" #include "../../vick-move/src/move.hh" void enter_insert_mode(contents& contents, boost::optional<int>) { char ch; while((ch = getch()) != _escape) { contents.cont[contents.y].insert(contents.x, 1, ch); ...
Use parens to silence clang warnings
Use parens to silence clang warnings
C++
mpl-2.0
czipperz/vick-insert-mode
6dc250efec4765594879cb1728bdd71067304437
test/test_portable_launch.cpp
test/test_portable_launch.cpp
#include "gtest/gtest.h" #include "hemi/launch.h" HEMI_MEM_DEVICE int result; HEMI_MEM_DEVICE int rGDim; HEMI_MEM_DEVICE int rBDim; template <typename... Arguments> struct k { HEMI_DEV_CALLABLE_MEMBER void operator()(Arguments... args) { result = sizeof...(args); rGDim = 1;//gridDim.x; rBDim = 1;//blockDim.x;...
#include "gtest/gtest.h" #include "hemi/launch.h" HEMI_MEM_DEVICE int result; HEMI_MEM_DEVICE int rGDim; HEMI_MEM_DEVICE int rBDim; template <typename T, typename... Arguments> HEMI_DEV_CALLABLE T first(T f, Arguments...) { return f; } template <typename... Arguments> struct k { HEMI_DEV_CALLABLE_MEMBER void opera...
Work around gcc variadic arguments warning
Work around gcc variadic arguments warning
C++
bsd-3-clause
harrism/hemi,javier-cabezas/hemi,jleni/hemi,javier-cabezas/hemi,jleni/hemi,harrism/hemi
50a0e9052cbe7a038a9b4d0af852a7b8abda8fe5
Subsets/main.cpp
Subsets/main.cpp
class Solution { public: // Backtracking vector<vector<int>> subsets(vector<int>& nums) { vector<vector<int>> res; vector<int> sub; subsets(nums, sub, res, 0); return res; } void subsets(vector<int>& nums, vector<int>& sub, vector<vector<int>>& subs, int start) { ...
class Solution { public: // Backtracking vector<vector<int>> subsets(vector<int>& nums) { vector<vector<int>> res; vector<int> sub; subsets(nums, sub, res, 0); return res; } void subsets(vector<int>& nums, vector<int>& sub, vector<vector<int>>& subs, int start) { ...
Add another solution for the problem
Add another solution for the problem
C++
mit
Leobuaa/LeetCode
0db67dbd99c1a1d054bcd6e1ec3e1cc8b3467bfb
src/Subsystems/ElevatorSubsystem.cpp
src/Subsystems/ElevatorSubsystem.cpp
#include "ElevatorSubsystem.h" #include "../RobotMap.h" ElevatorSubsystem::ElevatorSubsystem() : Subsystem("ElevatorSubsystem"), pullMotorRight(PULL_MOTOR_RIGHT),pullMotorLeft(PULL_MOTOR_LEFT), underSwitch(UNDER_LIMIT),upSwitch(UP_LIMIT) { } void ElevatorSubsystem::InitDefaultCommand() { // Set the default co...
#include "ElevatorSubsystem.h" #include "../RobotMap.h" ElevatorSubsystem::ElevatorSubsystem() : Subsystem("ElevatorSubsystem"), pullMotorRight(PULL_MOTOR_RIGHT),pullMotorLeft(PULL_MOTOR_LEFT), underSwitch(UNDER_LIMIT),upSwitch(UP_LIMIT) { } void ElevatorSubsystem::InitDefaultCommand() { // Set the default co...
Fix Elevator Subsystem limit swtich
Fix Elevator Subsystem limit swtich
C++
epl-1.0
tokyotechnicalsamurai/shougun
da351767c6cad972fe3f39d5474c1c249e3f05d9
cpp/src/libxtreemfs/callback/execute_sync_request.cpp
cpp/src/libxtreemfs/callback/execute_sync_request.cpp
/* * Copyright (c) 2011 by Michael Berlin, Zuse Institute Berlin * * Licensed under the BSD License, see LICENSE file for details. * */ #include "libxtreemfs/callback/execute_sync_request.h" using namespace xtreemfs::rpc; using namespace xtreemfs::util; namespace xtreemfs { boost::thread_specific_ptr<int> intr...
/* * Copyright (c) 2011 by Michael Berlin, Zuse Institute Berlin * * Licensed under the BSD License, see LICENSE file for details. * */ #include "libxtreemfs/callback/execute_sync_request.h" using namespace xtreemfs::rpc; using namespace xtreemfs::util; namespace xtreemfs { /** The TLS pointer is set to != NUL...
Remove implicit malloc() from interruption signal handler to prevent a deadlock of the whole client.
client: Remove implicit malloc() from interruption signal handler to prevent a deadlock of the whole client. git-svn-id: 4a24f560d5bb049edaa12cbc2145b2f5ee41c6a2@2708 f8528748-c2c0-11dd-ba5c-d3b7c2b3b534
C++
bsd-3-clause
jswrenn/xtreemfs,kleingeist/xtreemfs,jswrenn/xtreemfs,kleingeist/xtreemfs,rbaerzib/xtreemfs,stanik137/xtreemfs,harnesscloud/xtreemfs,harnesscloud/xtreemfs,rbaerzib/xtreemfs,kleingeist/xtreemfs,jswrenn/xtreemfs,rbaerzib/xtreemfs,stanik137/xtreemfs,rbaerzib/xtreemfs,stanik137/xtreemfs,jswrenn/xtreemfs,harnesscloud/xtreem...
cb67f617dcb554864fae25f35e1f361ee9029989
test/Headers/wchar_limits.cpp
test/Headers/wchar_limits.cpp
// RUN: %clang -fsyntax-only -verify %s // RUN: %clang -fsyntax-only -verify -fshort-wchar %s #include <limits.h> const bool swchar = (wchar_t)-1 > (wchar_t)0; #ifdef __WCHAR_UNSIGNED__ int signed_test[!swchar]; #else int signed_test[swchar]; #endif int max_test[WCHAR_MAX == (swchar ? -(WCHAR_MIN+1) : (wchar_t)-1)]...
// RUN: %clang_cc1 -ffreestanding -fsyntax-only -verify %s // RUN: %clang_cc1 -ffreestanding -fsyntax-only -verify -fshort-wchar %s #include <limits.h> const bool swchar = (wchar_t)-1 > (wchar_t)0; #ifdef __WCHAR_UNSIGNED__ int signed_test[!swchar]; #else int signed_test[swchar]; #endif int max_test[WCHAR_MAX == (s...
Use -ffreestanding with clang_cc1 to make the test picks the clang builtin include.
Use -ffreestanding with clang_cc1 to make the test picks the clang builtin include. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@135766 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-cl...
c7767a686eb4c6f8a5fe9ed2bc1decf6eda392a2
imports/TelegramQtQml/DeclarativeUserInfo.cpp
imports/TelegramQtQml/DeclarativeUserInfo.cpp
#include "DeclarativeUserInfo.hpp" #include "Client.hpp" #include "DataStorage.hpp" namespace Telegram { namespace Client { DeclarativeUserInfo::DeclarativeUserInfo(QObject *parent) : DeclarativeClientOperator(parent) { } void DeclarativeUserInfo::setContactId(quint32 contactId) { if (m_contactId == contac...
#include "DeclarativeUserInfo.hpp" #include "Client.hpp" #include "DataStorage.hpp" #include <QLoggingCategory> Q_DECLARE_LOGGING_CATEGORY(c_qmlLoggingCategory) namespace Telegram { namespace Client { DeclarativeUserInfo::DeclarativeUserInfo(QObject *parent) : DeclarativeClientOperator(parent) { } void Decla...
Print a warning if client is not set
Declarative/UserInfo: Print a warning if client is not set
C++
lgpl-2.1
Kaffeine/telegram-qt,Kaffeine/telegram-qt,Kaffeine/telegram-qt
37f2aec2a0442293947967f49aa071034b728521
test/asan/TestCases/large_allocator_unpoisons_on_free.cc
test/asan/TestCases/large_allocator_unpoisons_on_free.cc
// Test that LargeAllocator unpoisons memory before releasing it to the OS. // RUN: %clangxx_asan %s -o %t // The memory is released only when the deallocated chunk leaves the quarantine, // otherwise the mmap(p, ...) call overwrites the malloc header. // RUN: ASAN_OPTIONS=quarantine_size=1 %t #include <assert.h> #inc...
// Test that LargeAllocator unpoisons memory before releasing it to the OS. // RUN: %clangxx_asan %s -o %t // The memory is released only when the deallocated chunk leaves the quarantine, // otherwise the mmap(p, ...) call overwrites the malloc header. // RUN: ASAN_OPTIONS=quarantine_size=1 %t #include <assert.h> #inc...
Fix one test on OSX.
[asan] Fix one test on OSX. git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@201564 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
744f90339f662e1e576d87c4aa2c307acf5dc0ff
src/core/datastructures/spatialdata.cpp
src/core/datastructures/spatialdata.cpp
/********************************************************************************* * * Inviwo - Interactive Visualization Workshop * * Copyright (c) 2013-2017 Inviwo Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided th...
/********************************************************************************* * * Inviwo - Interactive Visualization Workshop * * Copyright (c) 2013-2017 Inviwo Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided th...
Remove extraneous IVW_CORE_API in explicit template instantiation
Core: Remove extraneous IVW_CORE_API in explicit template instantiation
C++
bsd-2-clause
Sparkier/inviwo,inviwo/inviwo,Sparkier/inviwo,inviwo/inviwo,Sparkier/inviwo,inviwo/inviwo,inviwo/inviwo,Sparkier/inviwo,inviwo/inviwo,inviwo/inviwo,Sparkier/inviwo
d54e6a91ecaf7ef8be8d4fd3d31383a5ffdf6401
libs/csutil/unix/username.cpp
libs/csutil/unix/username.cpp
/* Copyright (C) 2002 by Eric Sunshine <sunshine@sunshineco.com> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any l...
/* Copyright (C) 2002 by Eric Sunshine <sunshine@sunshineco.com> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any l...
Build fix for unix (return type csSting incomplete). Hope it's correct...
Build fix for unix (return type csSting incomplete). Hope it's correct... git-svn-id: 28d9401aa571d5108e51b194aae6f24ca5964c06@22653 8cc4aa7f-3514-0410-904f-f2cc9021211c
C++
lgpl-2.1
crystalspace/CS,crystalspace/CS,crystalspace/CS,crystalspace/CS,crystalspace/CS,crystalspace/CS,crystalspace/CS,crystalspace/CS
21810c1f4e59ba515a5c7fd22815fb913be48322
content/child/file_info_util.cc
content/child/file_info_util.cc
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/child/file_info_util.h" #include "base/logging.h" #include "third_party/WebKit/public/platform/WebFileInfo.h" namespace content { voi...
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/child/file_info_util.h" #include "base/logging.h" #include "third_party/WebKit/public/platform/WebFileInfo.h" namespace content { voi...
Upgrade Blink to milliseconds-based last modified filetimes, part 2.
Upgrade Blink to milliseconds-based last modified filetimes, part 2. With WebFileInfo::modificationTimeMS now available, have content::FileInfoToWebFileInfo() set it accordingly and alongside modificationTime. 1: [blink] add WebFileInfo::modificationTimeMS [ https://codereview.chromium.org/873723004/ ] 2: [chromium] ...
C++
bsd-3-clause
ltilve/chromium,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,ltilve/chromium,PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,hgl888/chromium-crosswalk,Chilledheart/chromium,Fireblend/...
68dfd2694f61e5d85eacbad1d0af0553589e7c4c
apps/HelloAndroidCamera2/jni/edge_detect_generator.cpp
apps/HelloAndroidCamera2/jni/edge_detect_generator.cpp
#include "Halide.h" namespace { class EdgeDetect : public Halide::Generator<EdgeDetect> { public: ImageParam input{ UInt(8), 2, "input" }; Func build() { Var x, y; Func clamped = Halide::BoundaryConditions::repeat_edge(input); // Gradients in x and y. Func gx("gx"); ...
#include "Halide.h" namespace { class EdgeDetect : public Halide::Generator<EdgeDetect> { public: ImageParam input{ UInt(8), 2, "input" }; Func build() { Var x, y; Func clamped = Halide::BoundaryConditions::repeat_edge(input); // Gradients in x and y. Func gx("gx"); ...
Fix overflow bug in edge detector
Fix overflow bug in edge detector Former-commit-id: 1d7fd3e5cf773ffc971ac069218b677b861daa83
C++
mit
Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide
90a69f45126237f64d28e0860ada56e9e05779e2
source/process/renderers/SubDocPropValueRenderer.cpp
source/process/renderers/SubDocPropValueRenderer.cpp
#include "SubDocPropValueRenderer.h" #include <rapidjson/document.h> #include <glog/logging.h> namespace sf1r { void SubDocPropValueRenderer::renderSubDocPropValue( const std::string& propName, const std::string& origText, izenelib::driver::Value& resourceValue) { if (origText.empty()) return; ...
#include "SubDocPropValueRenderer.h" #include <rapidjson/document.h> #include <glog/logging.h> namespace sf1r { void SubDocPropValueRenderer::renderSubDocPropValue( const std::string& propName, const std::string& origText, izenelib::driver::Value& resourceValue) { if (origText.empty()) return; ...
Add checker for illegal json string
Add checker for illegal json string
C++
apache-2.0
pombredanne/sf1r-lite,izenecloud/sf1r-lite,izenecloud/sf1r-ad-delivery,izenecloud/sf1r-lite,izenecloud/sf1r-ad-delivery,izenecloud/sf1r-ad-delivery,pombredanne/sf1r-lite,izenecloud/sf1r-lite,pombredanne/sf1r-lite,pombredanne/sf1r-lite,izenecloud/sf1r-ad-delivery,izenecloud/sf1r-ad-delivery,izenecloud/sf1r-lite,pombreda...
96853df47b295188b33ef3b12b60991535fe7712
test/test_json.cpp
test/test_json.cpp
#include <fstream> #include <iostream> #include "person.pb.h" //#include "../pb2json.h" #include <pb2json.h> using namespace std; int main(int argc,char *argv[]) { ifstream fin("dump",ios::binary); fin.seekg(0,ios_base::end); size_t len = fin.tellg(); fin.seekg(0,ios_base::beg); char *buf = new char [len]; fin...
#include <fstream> #include <iostream> #include "person.pb.h" //#include "../pb2json.h" #include <pb2json.h> using namespace std; int main(int argc,char *argv[]) { // Test 1: read binary PB from a file and convert it to JSON ifstream fin("dump",ios::binary); fin.seekg(0,ios_base::end); size_t len = fin.tellg(); ...
Add unit test for new wrapper call.
Add unit test for new wrapper call.
C++
mit
shafreeck/pb2json,iguchunhui/pb2json,iguchunhui/pb2json,shafreeck/pb2json
772520a73ba32ad5b57ed1ba33f14adc676cbdf6
test/tst_input.cpp
test/tst_input.cpp
#include <QtTest/QtTest> #include <gui/input.h> class TestInput: public QObject { Q_OBJECT private slots: void specialKeys(); private: NeovimQt::InputConv input; }; void TestInput::specialKeys() { foreach(int k, input.specialKeys.keys()) { QCOMPARE(input.convertKey("", k, Qt::NoModifier), QString("<%1>").ar...
#include <QtTest/QtTest> #include <gui/input.h> class TestInput: public QObject { Q_OBJECT private slots: void specialKeys(); private: NeovimQt::InputConv input; }; void TestInput::specialKeys() { foreach(int k, input.specialKeys.keys()) { QCOMPARE(input.convertKey("", k, Qt::NoModifier), QString("<%1>").ar...
Fix input test on Mac for ControlModifier
Fix input test on Mac for ControlModifier On Mac OS X Qt's ControlModifier is actually the Cmd key and generates the input sequence <D-Key>.
C++
isc
equalsraf/neovim-qt,equalsraf/neovim-qt,equalsraf/neovim-qt,equalsraf/neovim-qt
abe36e26a5978e14f6e8ed62a47400f1c0ffbb4d
test/CXX/basic/basic.lookup/basic.lookup.unqual/p15.cpp
test/CXX/basic/basic.lookup/basic.lookup.unqual/p15.cpp
// RUN: clang-cc -fsyntax-only -verify %s // XFAIL: * class C { public: C(int a, int b); }; C::C(int a, // expected-note {{previous definition}} int b) // expected-note {{previous definition}} try { int c; } catch (int a) { // expected-error {{redefinition of 'a'}} int b; // expected-error {{redefinition ...
// RUN: clang-cc -fsyntax-only -verify %s // XFAIL: * class C { public: C(int a, int b); }; C::C(int a, // expected-note {{previous definition}} int b) // expected-note {{previous definition}} try { int c; } catch (int a) { // expected-error {{redefinition of 'a'}} int b; // expected-error {{redefinition ...
Tweak expected error message, although we still fail this test
Tweak expected error message, although we still fail this test git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@89875 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/cl...
0e76625dcc45865707b199bcd63d727b70fc05b1
test/CodeGenCXX/2004-03-08-ReinterpretCastCopy.cpp
test/CodeGenCXX/2004-03-08-ReinterpretCastCopy.cpp
// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - // FIXME: Don't assert for non-Win32 triples (PR18251). // RUN: %clang_cc1 -triple i686-pc-win32 -fno-rtti -emit-llvm %s -o - struct A { virtual void Method() = 0; }; struct B : public A { virtual void Method() { } }; typedef void (A::*fn_type_a)...
// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - // RUN: %clang_cc1 -triple %ms_abi_triple -fno-rtti -emit-llvm %s -o - struct A { virtual void Method() = 0; }; struct B : public A { virtual void Method() { } }; typedef void (A::*fn_type_a)(void); typedef void (B::*fn_type_b)(void); int main(in...
Remove FIXME and hardcoded triple from this test (PR18251)
Remove FIXME and hardcoded triple from this test (PR18251) We don't support using the MS ABI with non-x86/x86_64 targets anyway. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@201260 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-cl...
cb1dc3f74c0abe9f84701468d8f03b6169a1d7aa
engine/src/fabric/dataCore.cpp
engine/src/fabric/dataCore.cpp
#include <fabric/dataCore.hpp> fabric::DataCore::DataCore() { camPos.x = 0; camPos.y = 1; camPos.z = 0; }
#include <fabric/dataCore.hpp> fabric::DataCore::DataCore() { camPos.x = 0; camPos.y = 0; camPos.z = 0; }
Set cam pos to (0, 0, 0)
Set cam pos to (0, 0, 0)
C++
mit
batburger/fabricEngine
a1609fba8eac3274fd9272f6be8c97fbfc300f81
history/src/collect_history.cc
history/src/collect_history.cc
#include <monsoon/history/collect_history.h> namespace monsoon { collect_history::~collect_history() noexcept {} std::size_t collect_history::metrics_hash::operator()( const std::tuple<group_name, metric_name>& t) const noexcept { return std::hash<group_name>()(std::get<0>(t)); } std::size_t collect_history...
#include <monsoon/history/collect_history.h> namespace monsoon { collect_history::~collect_history() noexcept {} std::size_t collect_history::metrics_hash::operator()( const std::tuple<group_name, metric_name>& t) const noexcept { return std::hash<group_name>()(std::get<0>(t)) ^ std::hash<metric_name>(...
Strengthen hash function for (un)tagged metric name lookups.
Strengthen hash function for (un)tagged metric name lookups.
C++
bsd-2-clause
nahratzah/monsoon_plus_plus,nahratzah/monsoon_plus_plus,nahratzah/monsoon_plus_plus
26d7bfa6fa900edc05be795d7cff1774f84ec7e8
examples/c++/max_array_opt.cpp
examples/c++/max_array_opt.cpp
// Compile with -O3 -march=native to see autovectorization typedef double * __attribute__((aligned(64))) aligned_double; void maxArray(aligned_double __restrict x, aligned_double __restrict y) { for (int i = 0; i < 65536; i++) { x[i] = ((y[i] > x[i]) ? y[i] : x[i]); } }
// Compile with -O3 -march=native to see autovectorization typedef double *__attribute__((aligned(64))) aligned_double; void maxArray(aligned_double __restrict x, aligned_double __restrict y) { for (int i = 0; i < 65536; i++) { x[i] = ((y[i] > x[i]) ? y[i] : x[i]); } }
Fix max array opt version
Fix max array opt version
C++
bsd-2-clause
mattgodbolt/compiler-explorer,mattgodbolt/compiler-explorer,dkm/gcc-explorer,mattgodbolt/compiler-explorer,dkm/gcc-explorer,mattgodbolt/gcc-explorer,mattgodbolt/compiler-explorer,mattgodbolt/gcc-explorer,mattgodbolt/gcc-explorer,dkm/gcc-explorer,mattgodbolt/gcc-explorer,dkm/gcc-explorer,mattgodbolt/compiler-explorer,dk...
82a4e805fa989cccff4b7a7c96e907d00754a4db
src/ArchiveListItemWidget.cpp
src/ArchiveListItemWidget.cpp
#include <QFile> #include "ArchiveModel.hh" #include "ArchiveListItemWidget.hh" #include "ui_ArchiveListItemWidget.h" #include "HumanReadableSize.hh" ArchiveListItemWidget::ArchiveListItemWidget(QWidget *parent) : QWidget(parent), d_ui(QSharedPointer<Ui::ArchiveListItemWidget>(new Ui::ArchiveListItemWidget()...
#include <QFile> #include "ArchiveModel.hh" #include "ArchiveListItemWidget.hh" #include "ui_ArchiveListItemWidget.h" #include "HumanReadableSize.hh" ArchiveListItemWidget::ArchiveListItemWidget(QWidget *parent) : QWidget(parent), d_ui(QSharedPointer<Ui::ArchiveListItemWidget>(new Ui::ArchiveListItemWidget()...
Hide download size if file is already downloaded.
Hide download size if file is already downloaded.
C++
lgpl-2.1
evdmade01/dact,rug-compling/dact,rug-compling/dact,evdmade01/dact,evdmade01/dact
b184ddebb9646658091716dc330a0098a7e23800
chrome/browser/extensions/extension_infobar_apitest.cc
chrome/browser/extensions/extension_infobar_apitest.cc
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/command_line.h" #include "chrome/browser/extensions/extension_apitest.h" #include "chrome/common/chrome_switches.h" #if defined(TOOLKI...
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/command_line.h" #include "chrome/browser/extensions/extension_apitest.h" #include "chrome/common/chrome_switches.h" #if defined(TOOLKI...
Disable ExtensionApiTest.Infobars on Mac, as it is flaky.
Disable ExtensionApiTest.Infobars on Mac, as it is flaky. BUG=60990 TEST=ExtensionApiTest.Infobars Review URL: http://codereview.chromium.org/6798005 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@80553 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
Jonekee/chromium.src,timopulkkinen/BubbleFish,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,zcbenz/cefode-chromium,hujiajie/pa-chromium,markYoungH/chromium.src,keishi/chromium,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,dednal/chromium.src,rogerwang/chromium,junmin-zhu/chromium-rivertrail,hgl888/chromi...
2516c8aed63dd05a1d200e289b21ef4677a6ee43
src/gazebo_plugins/src/SetupWorld.cpp
src/gazebo_plugins/src/SetupWorld.cpp
#include <sdf/sdf.hh> #include "gazebo/gazebo.hh" #include "gazebo/common/Plugin.hh" #include "gazebo/msgs/msgs.hh" #include "gazebo/physics/physics.hh" #include "gazebo/transport/transport.hh" #include <iostream> using namespace std; namespace gazebo { class SetupWorld : public WorldPlugin { public: void Loa...
#include <sdf/sdf.hh> #include "gazebo/gazebo.hh" #include "gazebo/common/Plugin.hh" #include "gazebo/msgs/msgs.hh" #include "gazebo/physics/physics.hh" #include "gazebo/transport/transport.hh" #include <iostream> using namespace std; namespace gazebo { class SetupWorld : public WorldPlugin { public: void Loa...
Allow the sim to run full speed
Allow the sim to run full speed
C++
mit
BCLab-UNM/SwarmBaseCode-ROS,BCLab-UNM/SwarmBaseCode-ROS,BCLab-UNM/SwarmBaseCode-ROS,BCLab-UNM/SwarmBaseCode-ROS,BCLab-UNM/SwarmBaseCode-ROS,BCLab-UNM/SwarmBaseCode-ROS
690cee719966beac6048c2189172e86e61155e74
src/nostalgia/core/userland/media.cpp
src/nostalgia/core/userland/media.cpp
/* * Copyright 2016 - 2018 gtalent2@gmail.com * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <ox/fs/filesystem.hpp> #include <ox/std/std.hpp> #inc...
/* * Copyright 2016 - 2018 gtalent2@gmail.com * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <ox/fs/fs.hpp> #include <ox/std/std.hpp> #include ".....
Fix FS refactor build issue
Fix FS refactor build issue
C++
mpl-2.0
wombatant/nostalgia,wombatant/nostalgia,wombatant/nostalgia
809471eca73f6a82d8eb3b5601c7ad2c76c9356f
source/term_factory.cpp
source/term_factory.cpp
// Petter Strandmark 2013. #include <map> #include <stdexcept> #include <vector> #include <spii/term_factory.h> using namespace std; namespace spii { class TermFactory::Implementation { public: map<string, TermCreator> creators; }; TermFactory::TermFactory() : impl(new TermFactory::Implementation) { } Term* Ter...
// Petter Strandmark 2013. #include <map> #include <stdexcept> #include <vector> #include <spii/term_factory.h> using namespace std; namespace spii { class TermFactory::Implementation { public: map<string, TermCreator> creators; }; TermFactory::TermFactory() : impl(new TermFactory::Implementation) { } Term* Ter...
Use the member functions begin and end.
Use the member functions begin and end.
C++
bsd-2-clause
PetterS/spii,yuhangwang/spii
ddeffaf5dcec2a0c2448387aa5d46f1ea5349c25
chrome/browser/extensions/extension_infobar_apitest.cc
chrome/browser/extensions/extension_infobar_apitest.cc
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/command_line.h" #include "chrome/browser/extensions/extension_apitest.h" #include "chrome/common/chrome_switches.h" #if defined(TOOLKI...
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/command_line.h" #include "chrome/browser/extensions/extension_apitest.h" #include "chrome/common/chrome_switches.h" #if defined(TOOLKI...
Revert 64157 - Marking ExtensionApiTest.Infobars as FAILS until 10.5 issue is resolved. Reverting in order to create a proper CL for it. BUG=60990
Revert 64157 - Marking ExtensionApiTest.Infobars as FAILS until 10.5 issue is resolved. Reverting in order to create a proper CL for it. BUG=60990 TBR=vangelis@chromium.org Review URL: http://codereview.chromium.org/4200006 git-svn-id: http://src.chromium.org/svn/trunk/src@64161 4ff67af0-8c30-449e-8e8b-ad334ec8d88c ...
C++
bsd-3-clause
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-u...
8a2373759abaa52eecea8a16b9eda6403884c9f3
chrome/browser/extensions/extension_storage_apitest.cc
chrome/browser/extensions/extension_storage_apitest.cc
// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/extensions/extension_apitest.h" IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Storage) { ASSERT_TRUE(RunExtensionTest("storage"...
// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/extensions/extension_apitest.h" #if defined(OS_LINUX) // See http://crbug.com/42943. #define MAYBE_Storage FLAKY_Storage #el...
Mark ExtensionApiTest.Storage as flaky. BUG=42943 TEST=none TBR=rafaelw
[Linux] Mark ExtensionApiTest.Storage as flaky. BUG=42943 TEST=none TBR=rafaelw Review URL: http://codereview.chromium.org/1810012 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@46083 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
fujunwei/chromium-crosswalk,robclark/chromium,mogoweb/chromium-crosswalk,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,Jonekee/chromium.src,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,bright-sparks/chromium-spacewalk,ChromiumWebApps/chromium,...
07cb77d332cf297293bf71087164d0608e13b726
webkit/glue/resource_loader_bridge.cc
webkit/glue/resource_loader_bridge.cc
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // #include "config.h" #include "webkit/glue/resource_loader_bridge.h" #include "net/http/http_response_headers.h" namespace webkit_glue { Re...
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // #include "config.h" #include "webkit/glue/resource_loader_bridge.h" #include "webkit/glue/webappcachecontext.h" #include "net/http/http_resp...
Fix an issue found by purify with my previous submission.
Fix an issue found by purify with my previous submission. Review URL: http://codereview.chromium.org/62122 git-svn-id: http://src.chromium.org/svn/trunk/src@13324 4ff67af0-8c30-449e-8e8b-ad334ec8d88c Former-commit-id: 9b4d648a30f120aa6158413fbbeaa8442a4c2c0d
C++
bsd-3-clause
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-u...
f4dd391ad9aebbc8603cefff5d41f7dcd9341b87
cvd_src/noarch/utility_float.cc
cvd_src/noarch/utility_float.cc
#include "cvd/utility.h" namespace CVD { void differences(const float* a, const float* b, float* diff, unsigned int size) { differences<float, float>(a, b, diff, size); } void add_multiple_of_sum(const float* a, const float* b, const float& c, float* out, unsigned int count) { add_multiple_of_sum<float, flo...
#include "cvd/utility.h" namespace CVD { void differences(const float* a, const float* b, float* diff, unsigned int size) { differences<float, float>(a, b, diff, size); } void add_multiple_of_sum(const float* a, const float* b, const float& c, float* out, size_t count) { add_multiple_of_sum<float, float>(a,...
Fix compiler error on OSX PPC: fix definition to match header.
Fix compiler error on OSX PPC: fix definition to match header.
C++
lgpl-2.1
oneminot/libcvd,oneminot/libcvd,oneminot/libcvd
d0867dd8094d253e270ab1a57f3285246a20dd46
src/test/pegtl/file_cstream.cpp
src/test/pegtl/file_cstream.cpp
// Copyright (c) 2016-2017 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <clocale> #include <cstdio> #include "test.hpp" namespace tao { namespace TAOCPP_PEGTL_NAMESPACE { struct file_content : seq< TAOCPP_PEGTL_STRING( "dummy conten...
// Copyright (c) 2016-2017 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <clocale> #include <cstdio> #include "test.hpp" namespace tao { namespace TAOCPP_PEGTL_NAMESPACE { struct file_content : seq< TAOCPP_PEGTL_STRING( "dummy conten...
Mark lines as NOLINT for clang-tidy
Mark lines as NOLINT for clang-tidy
C++
mit
ColinH/PEGTL,ColinH/PEGTL
f2ae16187305521fc48fec769d25f55bf2681738
src/SearchResultSection/View/SearchResultSectionOrder.cpp
src/SearchResultSection/View/SearchResultSectionOrder.cpp
// Copyright eeGeo Ltd (2012-2015), All Rights Reserved #include "SearchResultSectionOrder.h" #include "SearchResultModel.h" #include "SearchVendorNames.h" namespace ExampleApp { namespace SearchResultSection { namespace View { bool SearchResultSectionOrder::operator() (const Sear...
// Copyright eeGeo Ltd (2012-2015), All Rights Reserved #include <limits> #include <map> #include "SearchResultSectionOrder.h" #include "SearchResultModel.h" #include "SearchVendorNames.h" namespace ExampleApp { namespace SearchResultSection { namespace View { namespace ...
Order search result display order by vendor to more closely match web results. Buddy: Blair.
Order search result display order by vendor to more closely match web results. Buddy: Blair.
C++
bsd-2-clause
eegeo/eegeo-example-app,eegeo/eegeo-example-app,wrld3d/wrld-example-app,eegeo/eegeo-example-app,wrld3d/wrld-example-app,wrld3d/wrld-example-app,eegeo/eegeo-example-app,wrld3d/wrld-example-app,wrld3d/wrld-example-app,eegeo/eegeo-example-app,wrld3d/wrld-example-app,eegeo/eegeo-example-app,wrld3d/wrld-example-app,eegeo/ee...
c3bbc613c4b6d17dbf17c29eeb8105c223a17218
src/util/validation.cpp
src/util/validation.cpp
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2019 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <util/validation.h> #include <consensus/validation.h> #include <tinyfor...
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2019 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <util/validation.h> #include <consensus/validation.h> #include <tinyfor...
Refactor FormatStateMessage() to better match Core
Refactor FormatStateMessage() to better match Core Summary: This completes the backport of Core [[https://github.com/bitcoin/bitcoin/pull/16688 | PR16688]] (see my note in the summary of D6652). We diverge slightly due to a not-yet-backported change that will remove the RejectCode. Depends on D6860 Test Plan: `ninja...
C++
mit
Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc
36b3c875457305f3caaf957744ce6b7d443a772b
libqimessaging/examples/example_qi_signature_function.cpp
libqimessaging/examples/example_qi_signature_function.cpp
#include <iostream> #include <qimessaging/signature.hpp> //sample foo function to take the signature from int foo(int a, int b) { return a + b + 42; } int main() { //wrapper arround signature, to create the signature of a function with it's name std::string signature; signature = qi::makeFunctionSignature("...
#include <iostream> #include <qimessaging/signature.hpp> //sample foo function to take the signature from int foo(int a, int b) { return a + b + 42; } int main() { //wrapper arround signature, to create the signature of a function with it's name std::string signature; signature = qi::makeFunctionSignature("f...
Update function example for foo::i(ii), instead of foo::i:ii
Examples: Update function example for foo::i(ii), instead of foo::i:ii Change-Id: I78f2644fb56bc55d698cf852c11aa7020dc6cdbe Reviewed-on: http://gerrit.aldebaran.lan:8080/82 Reviewed-by: Cedric GESTES <ddb78fe00abb42f91254c16a0860e38eb0781789@aldebaran-robotics.com> Tested-by: Cedric GESTES <ddb78fe00abb42f91254c16a086...
C++
bsd-3-clause
aldebaran/libqi,vbarbaresi/libqi,aldebaran/libqi,aldebaran/libqi,bsautron/libqi,aldebaran/libqi-java,aldebaran/libqi-java,aldebaran/libqi-java
2d9ac75b93d77023d2a88302d575eae83cc7e48b
test/CodeGenCXX/mangle-fail.cpp
test/CodeGenCXX/mangle-fail.cpp
// RUN: %clang_cc1 -emit-llvm -x c++ -std=c++11 -verify %s -DN=1 // RUN: %clang_cc1 -emit-llvm -x c++ -std=c++11 -verify %s -DN=2 // RUN: %clang_cc1 -emit-llvm -x c++ -std=c++11 -verify %s -DN=3 struct A { int a; }; #if N == 1 // ChooseExpr template<class T> void test(int (&)[sizeof(__builtin_choose_expr(true, 1, 1),...
// RUN: %clang_cc1 -emit-llvm -x c++ -std=c++11 -triple %itanium_abi_triple -verify %s -DN=1 // RUN: %clang_cc1 -emit-llvm -x c++ -std=c++11 -triple %itanium_abi_triple -verify %s -DN=2 // RUN: %clang_cc1 -emit-llvm -x c++ -std=c++11 -triple %itanium_abi_triple -verify %s -DN=3 struct A { int a; }; #if N == 1 // Choo...
Fix test to specify an Itanium triple.
Fix test to specify an Itanium triple. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@231900 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-cl...
ea0a3432df5af67347f13e9ee9edb21fdfd8d6c8
Audio.EndPoint.Controller.Wrapper/AudioDeviceWrapper.cpp
Audio.EndPoint.Controller.Wrapper/AudioDeviceWrapper.cpp
#include "stdafx.h" #include "AudioDeviceWrapper.h" #include "DefSoundException.h" using namespace System; bool AudioEndPointControllerWrapper::AudioDeviceWrapper::Equals(Object ^ o) { if (o == (Object^)nullptr) return false; if(o->GetType() != this->GetType()) { return false; } ...
#include "stdafx.h" #include "AudioDeviceWrapper.h" #include "Audio.EndPoint.Controller.Wrapper.h" #include "DefSoundException.h" using namespace System; namespace AudioEndPointControllerWrapper { bool AudioDeviceWrapper::Equals(Object ^ o) { if (o == (Object^)nullptr) return false; ...
Make the device check for the presence of the NotificationClient In case it's not present, raise the event of change of default
Make the device check for the presence of the NotificationClient In case it's not present, raise the event of change of default
C++
mit
Belphemur/AudioEndPointLibrary,Belphemur/AudioEndPointLibrary
80f8fff6f294e7764f8d2489f2d7d7f5b7a8aee5
src/tests/test-getusername.cpp
src/tests/test-getusername.cpp
#include <string> #include <vector> #include <unistd.h> #include <gtest/gtest.h> #include <scxcorelib/scxstrencodingconv.h> #include "getusername.h" using std::string; using std::vector; using SCXCoreLib::Utf16leToUtf8; TEST(GetUserName,simple) { // allocate a WCHAR_T buffer to receive username DWORD lpnSize = 64; ...
#include <string> #include <vector> #include <unistd.h> #include <gtest/gtest.h> #include <scxcorelib/scxstrencodingconv.h> #include "getusername.h" using std::string; using std::vector; using SCXCoreLib::Utf16leToUtf8; TEST(GetUserName,simple) { // allocate a WCHAR_T buffer to receive username DWORD lpnSize = 64; ...
Clarify lpBuffer layout in GetUserName unit test
Clarify lpBuffer layout in GetUserName unit test
C++
mit
TravisEz13/PowerShell,kmosher/PowerShell,jsoref/PowerShell,bingbing8/PowerShell,PaulHigin/PowerShell,KarolKaczmarek/PowerShell,kmosher/PowerShell,bmanikm/PowerShell,bmanikm/PowerShell,daxian-dbw/PowerShell,jsoref/PowerShell,KarolKaczmarek/PowerShell,daxian-dbw/PowerShell,bmanikm/PowerShell,PaulHigin/PowerShell,bmanikm/...
37387e52c8ec3bbb75b01f2aa4fdc37737836eee
SamplePushReceiverGatewayPlugin/main.cpp
SamplePushReceiverGatewayPlugin/main.cpp
#include <iostream> #include <string> #include "ace/INET_Addr.h" #include "ace/SOCK_Connector.h" #include "ace/SOCK_Stream.h" #include "ace/SOCK_Acceptor.h" #include "ace/Acceptor.h" #include "ace/Reactor.h" #include "AndroidServiceHandler.h" using namespace std; int main(int argc, char **argv) { cout << "Cre...
#include <iostream> #include <string> #include "ace/Reactor.h" #include "GatewayConnector/GatewayConnector.h" using namespace std; int main(int argc, char **argv) { cout << "Creating gateway connector..." << endl << flush; GatewayConnector *gatewayConnector = new GatewayConnector(NULL); //Get the proc...
Make sample push receiver actually compile
Make sample push receiver actually compile
C++
mit
isis-ammo/ammo-gateway,isis-ammo/ammo-gateway,isis-ammo/ammo-gateway,isis-ammo/ammo-gateway,isis-ammo/ammo-gateway,isis-ammo/ammo-gateway