OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-cogutil commits / 66d914c

Remove obsolete code
66d914c9f2a735972df28c5f0aaca0305de030ce
by Linas Vepštas <linasvepstas@gmail.com> · 2025-12-10T20:04:59.000Z

Changed files (2) +0 -48

opencog/util/CMakeLists.txt +0 -2
……@@ -16,7 +16,6 @@ ADD_LIBRARY(cogutil SHARED
1616 algorithm.h
1717 backtrace-symbols.c
1818 Config.cc
19 dorepeat.h
2019 exceptions.cc
2120 lazy_selector.cc
2221 lazy_random_selector.cc
……@@ -109,7 +108,6 @@ INSTALL(FILES
109108 concurrent_queue.h
110109 concurrent_set.h
111110 concurrent_stack.h
112 dorepeat.h
113111 empty_string.h
114112 exceptions.h
115113 lazy_random_selector.h
opencog/util/dorepeat.h +0 -46
……@@ -1,46 +0,0 @@
1/*
2 * opencog/util/dorepeat.h
3 *
4 * Copyright (C) 2002-2007 Novamente LLC
5 * All Rights Reserved
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU Affero General Public License v3 as
9 * published by the Free Software Foundation and including the exceptions
10 * at http://opencog.org/wiki/Licenses
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program; if not, write to:
19 * Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 */
22
23#ifndef dorepeat
24/** \addtogroup grp_cogutil
25 * @{
26 */
27
28//!@{
29//! helper for dorepeat(n)
30#define __DOREPEAT_CONCAT_3_( a, b ) a##b
31#define __DOREPEAT_CONCAT_2_( a, b ) __DOREPEAT_CONCAT_3_( a, b )
32#define __DOREPEAT_CONCAT( a, b ) __DOREPEAT_CONCAT_2_( a, b )
33#define __DOREPEAT_UNIQUE_NAME __DOREPEAT_CONCAT( DOREPEAT_UNIQUE_NAME_, __LINE__ )
34//!@}
35
36//! dorepeat(n) foo
37/** repeats foo n times
38 * maybe its mean to other people use this, but its certainly nicer that typing
39 * for (int i=0;i<n;++i) when you never use i!
40 */
41#define dorepeat(N) \
42 for (unsigned int __DOREPEAT_UNIQUE_NAME=N; __DOREPEAT_UNIQUE_NAME>0;--__DOREPEAT_UNIQUE_NAME)
43
44/** @}*/
45
46#endif