Home » Community » U++ community news and announcements » 2024rc1
Re: 2024rc1 [message #60971 is a reply to message #60963] |
Tue, 15 October 2024 13:31   |
 |
mirek
Messages: 14261 Registered: November 2005
|
Ultimate Member |
|
|
Lance wrote on Mon, 14 October 2024 16:23mirek wrote on Mon, 14 October 2024 10:13Lance wrote on Sat, 12 October 2024 20:20Code Reformat Issue.
I have been having issues with it for a while. Today I spend a few hours to create a almost mininal example.
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
class S{
void Set ( Size& sz,
int x, int y, int z,
int x1, int y1, int z1
);
const S& f(Rect& r, Rect& s)const;
struct D
{
int s(int rc)const
{
return rc*2;
}
int e(int rc)const
{
return rc*1;
}
int w(int rc)const
{
return rc*3;
}
int t()const
{
return 4;
}
int g(int k)const
{
return k;
}
void alloc();
void alloc(int a);
int v1;
int v2;
};
D col,row;
};
void S::D::alloc ()
{
}
static void func ( int& x, int& y, int& x1, int& y1, int x2, int y2,
int x3, int y3, int x4, int y4
)
{
}
const S& S::f(Rect& r, Rect& s)const
{
int t, l, row_section_bottom, n;
r.top = row.g(r.top);
s.top = t !=0 && r.top<row.v1 ? row.v1 : r.top;
r.left = col.g(r.left);
s.left = l != 0 && r.left< col.v1 ? col.v1 : r.left;
r.bottom = row.g(r.bottom);
s.bottom = row_section_bottom == 1 && r.bottom > row.v1 + row.v2 ?
row.v1+row.v2 : r.bottom;
r.right = col.g(r.right);
s.right = n == 1 && r.right> col.v1 + col.v2 ?
col.v1+col.v2 : r.right;
return *this;
}
Add the code as a separate cpp file in a CtrlLib application, with it current, press Ctrl+I to reformat it. The file before reformat compiles fine, not the reformatted one.
Works for me in windows and works in Ubuntu. Unfortunately, this feature is now using clang-format that can be different per distro...
Would be nice to give me a hint which host platform is in use...
Also, if nothing helps, please post reformatted text as well.
Mirek
Operation System: Ubuntu 24.04.1 LTS
GNOME version: 46
Windowing System: Wayland
clang-format --version: Ubuntu clang-format version 18.1.3 (1ubuntu1)
Reformatted output
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
class S {
void Set(Size& sz, int x, int y, int z, int x1, int y1, int z1);
const S& f(Rect& r, Rect& s) const;
struct D {
int s(int rc) const { return rc * 2; }
int e(int rc) const { return rc * 1; }
int w(int rc) const { return rc * 3; }
int t() const { return 4; }
int g(int k) const { return k; }
void alloc();
void alloc(int a);
int v1;
int v2;
};
D col, row;
};
void S::D::alloc() {}
static void func(int& x, int& y, int& x1, int& y1, int x2, int y2, int x3, int y3, int x4,
int y4)
{
}
const S& S::f(Rect& r, Rect& s) const
{
int t, l, row_section_bottom, n;
r.top = row.g(r.top);
s.top = t != 0 && r.top < row.v1 ? row.v1 : r.top;
r.left = col.g(r.left);
s.left = l != 0 && r.left< col.v1 ? col.v1 : r.left;
s.left = l != 0 && r.left < col.v1 ? col.v1 : r.left;
r.bottom = row.g(r.bottom);
s.bottom = row_section_bottom == 1 && r.bottom > row.v1 + row.v2 ?
s.bottom =
row_section_bottom == 1 && r.bottom > row.v1 + row.v2 ? row.v1 + row.v2 : r.bottom;
r.right = col.g(r.right);
s.right = n == 1 && r.right> col.v1 + col.v2 ?
s.right = n == 1 && r.right > col.v1 + col.v2 ? col.v1 + col.v2 : r.right;
}
Line 46 (?), Line 48 ending ( , LIne 50 (?), Line 51 ending ( are highlighted by theide(libclang) to indicate grammer errors.
OK, after a bit of thinking I have added some more code to logs branch
https://github.com/ultimatepp/ultimatepp/commit/04c14131cc46 99800ca6fa74421858c26cf3eb43
Can you reproduce the problem and send me those files?
Mirek
|
|
|
 |
|
2024rc1
By: mirek on Sat, 28 September 2024 09:16
|
 |
|
Re: 2024rc1
By: Tom1 on Sat, 28 September 2024 18:36
|
 |
|
Re: 2024rc1
By: JeyCi on Sat, 28 September 2024 19:21
|
 |
|
Re: 2024rc1
By: mirek on Sun, 29 September 2024 20:51
|
 |
|
Re: 2024rc1
By: Didier on Sat, 28 September 2024 20:50
|
 |
|
Re: 2024rc1
By: Tom1 on Sat, 28 September 2024 22:55
|
 |
|
Re: 2024rc1
By: mirek on Sun, 29 September 2024 20:55
|
 |
|
Re: 2024rc1
By: Tom1 on Sun, 29 September 2024 22:02
|
 |
|
Re: 2024rc1
By: mirek on Sun, 29 September 2024 23:14
|
 |
|
Re: 2024rc1
By: Lance on Mon, 30 September 2024 01:02
|
 |
|
Re: 2024rc1
By: mirek on Mon, 30 September 2024 12:01
|
 |
|
Re: 2024rc1
By: Tom1 on Mon, 30 September 2024 12:06
|
 |
|
Re: 2024rc1
By: Tom1 on Mon, 30 September 2024 15:37
|
 |
|
Re: 2024rc1
By: Lance on Sat, 12 October 2024 17:31
|
 |
|
Re: 2024rc1
By: Lance on Sat, 12 October 2024 20:20
|
 |
|
Re: 2024rc1
By: Lance on Sun, 13 October 2024 06:10
|
 |
|
Re: 2024rc1
By: mirek on Sun, 13 October 2024 07:52
|
 |
|
Re: 2024rc1
By: Lance on Sun, 13 October 2024 13:28
|
 |
|
Re: 2024rc1
By: mirek on Sun, 13 October 2024 13:55
|
 |
|
Re: 2024rc1
By: Lance on Sun, 13 October 2024 14:20
|
 |
|
Re: 2024rc1
By: mirek on Sun, 13 October 2024 13:58
|
 |
 |
Re: 2024rc1
By: Lance on Sun, 13 October 2024 14:23
|
 |
|
Re: 2024rc1
By: mirek on Mon, 14 October 2024 16:17
|
 |
|
Re: 2024rc1
By: Lance on Mon, 14 October 2024 17:09
|
 |
|
Re: 2024rc1
By: mirek on Tue, 15 October 2024 07:40
|
 |
|
Re: 2024rc1
By: mirek on Mon, 14 October 2024 16:13
|
 |
|
Re: 2024rc1
By: Lance on Mon, 14 October 2024 16:23
|
 |
|
Re: 2024rc1
By: mirek on Mon, 14 October 2024 16:42
|
 |
|
Re: 2024rc1
By: Lance on Mon, 14 October 2024 17:21
|
 |
|
Re: 2024rc1
By: mirek on Tue, 15 October 2024 13:31
|
 |
|
Re: 2024rc1
By: Lance on Tue, 15 October 2024 15:18
|
 |
|
Re: 2024rc1
By: mirek on Thu, 17 October 2024 10:47
|
 |
|
Re: 2024rc1
By: Lance on Thu, 17 October 2024 21:01
|
 |
|
Re: 2024rc1
By: Lance on Mon, 21 October 2024 02:11
|
 |
|
Re: 2024rc1
By: Lance on Mon, 21 October 2024 02:27
|
 |
|
Re: 2024rc1
By: mirek on Mon, 21 October 2024 09:05
|
 |
|
Re: 2024rc1
By: Lance on Mon, 21 October 2024 12:55
|
 |
|
Re: 2024rc1
By: Lance on Mon, 21 October 2024 13:01
|
 |
|
Re: 2024rc1
By: mirek on Mon, 21 October 2024 13:21
|
 |
|
Re: 2024rc1
By: mirek on Mon, 21 October 2024 14:45
|
 |
|
Re: 2024rc1
By: Lance on Mon, 21 October 2024 18:12
|
 |
|
Re: 2024rc1
By: Lance on Wed, 16 October 2024 00:11
|
 |
|
Re: 2024rc1
By: mirek on Wed, 16 October 2024 11:30
|
 |
 |
Re: 2024rc1
By: Lance on Wed, 16 October 2024 15:18
|
 |
|
Re: 2024rc1
By: Oblivion on Sun, 13 October 2024 09:53
|
 |
|
Re: 2024rc1
By: mirek on Mon, 14 October 2024 15:36
|
Goto Forum:
Current Time: Sun Jun 08 22:39:36 CEST 2025
Total time taken to generate the page: 0.04553 seconds
|